刚接触matlab帮忙看一下是什么原因,谢谢各位的帮忙Error using ==> plot Vectors must be the same len
x=3:15;y1=err(8,4,1,0.5,2,1,2);
y2=err(16,8,1,0.5,2,1,2);
y3=err(32,16,1,0.5,2,1,2);
y4=err(8,4,1,1,2,1,2);
y5=err(16,8,1,1,2,1,2);
y6=err(32,16,1,1,2,1,2);
y7=err(8,4,1,1.5,2,1,2);
y8=err(16,8,1,1.5,2,1,2);
y9=err(32,16,1,1.5,2,1,2);
plot(x,y1,'k--',x,y2,'r:',x,y3,'b-.',x,y4,'k--',x,y5,'r:',x,y6,'b-.',x,y7,'k--',x,y8,'r:',x,y9,'b-.')
%title('')
xlabel('iteration times')
ylabel('qh')
legend('Mesh h','Mesh h/2','Mesh h/4')
其中:y1=err(8,4,1,0.5,2,1,2)的值为:
y1 =
1.0e+013 *
4.4152 4.3858 4.3775 4.3771 4.3770 4.3770