[XLOADINGS,YLOADINGS] = plsregress(X,Y,NCOMP)
// Ncomp:主成分个数
// XLOADING : X 的线性组合系数矩阵
//YLOADING : y
// XSCORES is an N-by-NCOMP orthonormal matrix with rows corresponding to observations, columns to components.
// YSCORES is an N-by-NCOMP matrix with rows corresponding to observations,columns to components. YSCORES is neither orthogonal nor normalized.
//BETA is a (P+1)-by-M matrix, containing intercept terms(截距项) in the first row, i.e., Y = [ONES(N,1) X]*BETA + Yresiduals, and Y0 = X0*BETA(2:END,:) + Yresiduals.
// PCTVAR containing the percentage of variance explained by the model.
// MSE containing estimated mean squared errors for PLS models with 0:NCOMP components.
[XL2,YL2,XS2,YS2,BETA2,PCTVAR2,MSE2,stats2] =plsregress(a,b,ncomp)
beta3(1,:)=mu(n+1:end)-mu(1:n)./sig(1:n)*BETA2([2:end],:).*sig(n+1:end) %原始数据回归方程的常数