本文共 343 字,大约阅读时间需要 1 分钟。
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(get(AX(1),'Ylabel'),'String','Slow Decay') %左侧y轴set(get(AX(2),'Ylabel'),'String','Fast Decay') %右侧y轴xlabel('Time (\musec)')title('Multiple Decay Rates')set(H1,'LineStyle','--')%对应第一条曲线的线性y1set(H2,'LineStyle',':')%对应第一条曲线的线性y2
转载地址:http://ruzxf.baihongyu.com/