x=[1 1 2 3 3 4 4] x = 1 1 2 3 3 4 4 y=[35 30 56 66 68 119 92] y = 35 30 56 66 68 119 92 z=[1.55 1.75 4.5 3.4 2.55 6.9 4.3] z = Columns 1 through 6 1.5500 1.7500 4.5000 3.4000 2.5500 6.9000 Column 7 4.3000 c=cov(a) ??? Undefined function or variable 'a'. a=[x;y;z]' a = 1.0000 35.0000 1.5500 1.0000 30.0000 1.7500 2.0000 56.0000 4.5000 3.0000 66.0000 3.4000 3.0000 68.0000 2.5500 4.0000 119.0000 6.9000 4.0000 92.0000 4.3000 c=cov(a) c = 1.6190 37.4524 1.7988 37.4524 973.9524 52.0488 1.7988 52.0488 3.4914 mina=min(a) mina = 1.0000 30.0000 1.5500 maxa=max(a) maxa = 4.0000 119.0000 6.9000 priemer=mean(a) priemer = 2.5714 66.5714 3.5643 k23=c(2,3)/c(2,2) k23 = 0.0534 q23=priemer(3)-k23*priemer(2) q23 = 0.0067 plot(y,z,'g.');hold on, shg plot([mina(2),maxa(2)],[k23*mina(2)+q23,k23*maxa(2)+q23]);hold on plot(y,k23*y+q23,'+r');hold on interp1(y,z,80) ans = 3.4250 grid on interp1(z,y,80) ans = NaN interp1(y,z,80) ans = 3.4250 z1=k23*y+q23; interp1(y,z1,80) ans = 4.2819 plot(priemer(2),priemer(3),'kx') k32=c(3,2)/c(3,3) k32 = 14.9076 q32=priemer(2)-k32*priemer(3) q32 = 13.4365 plot([k32*mina(3)+q32,k32*maxa(3)+q32],[mina(3),maxa(3)]);hold on shg plot(k32*z+q32,z,'k<') z2=k32*z+q32 z2 = Columns 1 through 6 36.5433 39.5248 80.5207 64.1223 51.4509 116.2989 Column 7 77.5392 interp1(z,z2,5) ans = 87.9745 interp1(z,z2,4.5) ans = 80.5207 interp1(z,z2,80) ans = NaN interp1(y,z2,80) ans = 64.4950 y y = 35 30 56 66 68 119 92 y1=[mina(3),maxa(3)] y1 = 1.5500 6.9000 interp1(y1,z2,80) ??? Error using ==> interp1 X and Y must be of the same length. interp1(z,z2,80) ans = NaN interp1(y,z2,80) ans = 64.4950 z z = Columns 1 through 6 1.5500 1.7500 4.5000 3.4000 2.5500 6.9000 Column 7 4.3000 diria off ??? Undefined command/function 'diria'. diary off