figure;plot(xo')
figure;plot(avgxo')
figure;plot(stdxo')

figure
plot(xo','r+')
hold on
plot(xo2','bo')
hold off
title("Red = Removed Spectra via Residuals")
avgxo2 = mean(xo2);
stdxo2=std(xo2);
figure;plot(avgxo2')
figure;plot(stdxo2')

mdlcal = fitlm(zoe2,yo2); %returns a linear regression model of the responses y, fit to the data matrix X.
anova(mdl,'summary'); %test fit by anova
plot(mdlcal)
title('mdle2')

mdlpred = fitlm(w,u); %returns a linear regression model of the responses y, fit to the data matrix X.
anova(mdlpred,'summary'); %test fit by anova
figure;plot(mdlpred)
title('mdle2pred')