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 | |
---|
1 | function [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 |
---|
5 | UN = ones(size(Z)); |
---|
6 | Moy =moya ; |
---|
7 | Std =eca; |
---|
8 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
9 | Moy = diag(Moy); |
---|
10 | Moy = UN * Moy; |
---|
11 | taille=size(Z,1); |
---|
12 | Ecart_type = diag(sqrt((taille-1)/taille)*Std); |
---|
13 | Ecart_type = UN * Ecart_type; |
---|
14 | |
---|
15 | |
---|
16 | % Calcul de la matrice X des données centrées réduites |
---|
17 | X = (2/3).*(Z - Moy)./Ecart_type ; |
---|
Note: See
TracBrowser
for help on using the repository browser.