www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/DisplayTwoDataSetsWithDifferentYAxesExample.m
%% Plot Two Data Sets with Different y-Axes % Plot two data sets on one graph % using two _y_-axes. % Copyright 2015 The MathWorks, Inc. x = 0:0.01:20; y1 = 200*exp(-0.05*x).*sin(x); y2 = 0.8*exp(-0.5*x).*sin(10*x); figure % new figure plotyy(x,y1,x,y2)