function [B, options, Yhat, RMSEP] = pls2reg(X, Y, PC, premethod, XTst, YTst) [ntrn, nfea] = size(X); [ntrn, nres] = size(Y); if nargin < 4 premethod = 1; end if nargin < 3 PC = 10; end