matlab怎么改变纵坐标计数单位,如何更改matlab纵坐标数值
用set函数啊,给个范例吧
x = 0:0.01:20;
y1 = 200*exp(-0.05*x).*sin(x);
y2 = 0.8*exp(-0.5*x).*sin(10*x);
[ax,h1,h2] = plotyy(x,y1,x,y2,'plot');
set(ax(1),'xcolor','k','ycolor','b');
set(ax(2),'xcolor','k','ycolor','r');
hh1=get(ax(1),'ylabel');
set(hh1,'string','left y-axis');
set(hh1,'color','b');
hh2=get(ax(2),'ylabel');
set(hh2,'string','right y-axis');
set(hh2,'color','r');
set(h1,'linestyle','-');
set(h1,'color','b');
set(h2,'linestyle',':');
set(h2,'color','r');
legend([h1,h2],{'y1 = 200*exp(-0.05*x).*sin(x)';'y2 = 0.8*exp(-0.5*x).*sin(10*x)'});
xlabel('zero to 20 \musec.');
title('labeling plotyy');
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
