Hello.
My name is Jose.
I'm student of UPV in spain.
I need help for implement the PCA and PLS algotithms trhogth SVD method.
If someone can help me....
The only one that i have is this:
% PCA MEDIANTE SVD
% ENTRADAS
% A Matriz de datos
% SALIDAS
% u
% S
% V
% MATRIZ DE DATOS
A = [1 2;3 4]
% CALCULAMOS EL TAMAÑO DE LA MATRIZ
[M,N] = size(A);
% CALCULO DE LA MEDIA
mn = mean(A,2);
B = A - repmat(mn,1,N);
% CONSTRUCCION DE LA MATRIZ Y
stdA=std(A)
Y = stdA/ sqrt(N-1);
You need to change
%Lprinc=ones(nbp,length(E));
Lprinc=ones(nbp,size(E,2));
in order for the code to work for more observations than variables on newer versions of MATLAB.