www.gusucode.com > 《matlab图像处理与界面编程宝典》秦襄培 编著,每章的MATLAB源代码程序 > 第4章/代码4-2.txt
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') set(get(AX(2),'Ylabel'),'String','Fast Decay') xlabel('Time (\musec)') title('Multiple Decay Rates') set(H1,'LineStyle','--') set(H2,'LineStyle',':')