%% Plot Two Data Sets with Different y-Axes
% Plot two data sets on one graph using two y-axes.

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)

% Copyright 2015 The MathWorks, Inc.