on-internet
← Community

Why does PCA give a vector as output for a 294*40 matrix in matlab?

Stack Overflow ·

I am new to stats and matlab too. I have to do feature selection in my project so I used principle component analysis(pca). I referred tutorial to use pca in matlab My code is given below, pcaInput = rand(294,40); disp(size(pcaInput)) % output is 294 40 pcaOutput=pca(pcaInput); disp(size(pcaOutput)) % output is 40 1 , Unacceptable as per tutorial %that's it As per the tutorial , if the input matrix of pca() function has p variables , then the output is pp matrix.So the function should give me a matrix of 4040 but it is giving me a matrix of 40*1. where I am going wrong ? As per the tutorial ,

Comments

Sign in or sign up to comment and upvote.

No comments yet.