MATLAB: Dimensional reduction by PCA

dimensional reductionpca

I have an vector x whose dimension has to be reduced to 5 x 50 by PCA.
[5,500]=size(x);
while giving the no_dimns=50 I faced a problem
Warning: Target dimensionality reduced to 5.
Is it possible to reduce the dimension of matrix from 5 x 500 to 5 x 50??

Best Answer

I think that the code expects you provide x' or x transpose where the rows are 500 and columns are 5