File Exchange

image thumbnail


version 1.0 (215 KB) by

this implements the PCA algorithm. User can choose/input the no.of features in the reduced Dataset.



View License

this implements the well known PCA algorithm. It returns a Dataset with reduced no. of dimensions/features. The reduction factor i.e how many features the final/reduced Dataset should contain can be chosen by the user.

It contains a illustration dataset of faces (face.mat)(please see Read-me file) to show the usage.

Comments and Ratings (4)


lamiaa (view profile)

hi dear
i need a help in this code please
the code normalizes the data then get pca
i need to denormalize the matrix output from pca
please help

Andy Zhang

Hi,Dear devinder,thanks a lot for your share.I find a question when i use the code to reduce the dimensions of face dataset,the code process the data very very slow on the condition of the dimension is high such as 10240,do you have idears about how to resolve this question?

Chris Jademan

Is the final result supposed to be like this? Sorry, I am newbie in PCA.

ans 10 1o 10
mu 1x1024double -46.69... 40.2337
S 1024x1024double <Too... <Too...
sigma 1x1024double 29.3152 62.2655
U 1024x1024double <Too... <Too...
x 100x1024double -127.8... 126.13
x_norm100x1024double -3.8725... 3.8586
x-reduce 100x10double -47.67... 49.6306


handan (view profile)

MATLAB Release
MATLAB 7.10 (R2010a)

Inspired: EOF

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video