马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
在做一图时将三条图线做在一个图内,三条图线拟合后用plotyyy函数,则出现:
x=[0.001993,0.001891,0.001763,0.001661,0.001533,0.001431,0.001342,0.001252,0.00115,0.001022,0.000894,0.000779,0.000664,0.000537,0.000396,0.000268,0.000166,0.0000767];
>> y=[4.516735,6.149388,8.261633,9.445306,10.70041,11.30245,12.58816,13.04735,13.96571,14.75143,15.27184,16.05755,16.40449,17.01673,18.13918,18.75143,19.05755,19.26163];
>> y2=[0.402,0.408,0.402,0.396,0.39,0.384,0.378,0.372,0.36,0.348,0.342,0.324,0.312,0.306,0.288,0.27,0.258,0.252];
>> y3=[0.219575,0.279443,0.355287,0.38844,0.412455,0.412971,0.438046,0.430591,0.437384,0.42482,0.391582,0.378725,0.342509,0.292593,0.244595,0.182705,0.120296,0.057452];
>> aa=polyfit(x,y,2);
>> z=polyval(x,aa);
>> aa2=polyfit(x,y2,2);
>> z2=polyval(x,aa2);
>> aa3=polyfit(x,y3,2);
>> z3=polyval(x,aa3);
>> plotyyy(x,z,x,z2,x,z3)
错误:
??? Error using ==> plot
Vectors must be the same lengths.
Error in ==> plotyy>fevalfun at 288
h = feval(func,x,y);
Error in ==> plotyy at 61
[h1,ax(1)] = fevalfun(fun1,ax(1),x1,y1,caxspecified);
Error in ==> plotyyy at 25
[ax,hlines(1),hlines(2)] = plotyy(x1,y1,x2,y2);
请大家帮我分析一下,谢谢大家 |