matlab怎么改变纵坐标计数单位,如何更改matlab纵坐标数值

用set函数啊,给个范例吧 x = 0:0.01:20; y1 = 200*exp(-0.05*x).*sin(x); y2 = 0.8*exp(-0.5*x

用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');