Watch this Author's files
This is just a waste of time, there are plenty of errors..
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.
You need to initialize the variable "pc" in the beginning of the code ( pc=[]; ). Also, a ";" is missing in line 56. Otherwise it works fine.
Good job
NIPALS - Non-linear Iterative Partial Least Squares. see S. Wold and S. Martens PCA- Principal components analysis.
Contact us at files@mathworks.com