
 
mdlpred = fitlm(y1v20,y2v20); %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('mdle2 pred')

[totalClark, percentClark] = clarke(y1v20,y2v20);
dif = y1v20-y2v20;
figure; plot(dif)

[N M] = size(y1v20);
m=[1:N];
m=m';
figure; plot(m,y1v20,'-ro',m,y2v20,'-bo')