source: trunk/toolbox/cenred.m @ 23

Last change on this file since 23 was 4, checked in by pinsard, 15 years ago

dealing with CR/LF and encoding

  • Property svn:executable set to *
File size: 448 bytes
Line 
1function [X,moya,ecaa] = cenred(Z,moya,eca)
2% Fonction qui centree par moya et eca
3%avec la formule X=(2/3)*(Z-moya)/eca
4%les invivudus etant en ligne
5UN = ones(size(Z));
6Moy =moya ;
7Std =eca;
8%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9Moy = diag(Moy);
10Moy = UN * Moy;
11taille=size(Z,1);
12Ecart_type = diag(sqrt((taille-1)/taille)*Std);
13Ecart_type = UN * Ecart_type;
14 
15 
16% Calcul de la matrice X des données centrées réduites
17X = (2/3).*(Z - Moy)./Ecart_type ;
Note: See TracBrowser for help on using the repository browser.