pca

pca(X) returns the principal component coefficients for the data matrix X.

[coeff score latent] = pca(X) returns:
  • in coeff the principal component coefficients
  • in score the principal component scores
  • in latent the principal component variances

Examples

> y1 = [191; 195; 181; 183; 176; 208; 189; 197; 188; 192; 179; 183; 174; 190; 188; 163; 195; 186; 181; 175; 192; 174; 176; 197; 190]

> y2 = [155; 149; 148; 153; 144; 157; 150; 159; 152; 150; 158; 147; 150; 159; 151; 137; 155; 153; 145; 140; 154; 143; 139; 167; 163]

> [coeff score latent] = pca([y1,y2])

> coeff#

 0,82492945	-0,565235705
0,565235705	  0,82492945

> latent#

131.5183337
18.13499961

Resources

See also

cd | mfiles | pwd | rmpath