MATLAB: I have this , and is showing me the vector must be the same lenght plot

errorplot

clf lambda=[579.0 577.0 546.1 496.0 491.6 435.8 407.8 404,7] x=[66.1 66.3 69 75 75.8 85 92.5 93.5] plot(x,lambda,'o') p=polyfit(x,lambda,3) x=55:0.5:100 lambda=polyval(p,x) hold on plot(x,lambda) xlabel('x / arbitrary units') ylabel('\lambda / nm') title('Calibration curve of the spectroscope') xhelium=[63 64.9 70 79 80 83.2 88.1] lambdahelium=polyval(p,xhelium) xneon=[65.9 67.2 69.5 74.2] lambdaneon=polyval(p,xneon)

Best Answer

plot(x,lambda(1:numel(x)),'o')
Related Question