%% Plot Data Using Two y-Axes
% Create axes with a y-axis on both the left and right sides. Plot a set of data against the left y-axis. Then, use yyaxis right to activate the right side so that subsequent graphics functions target it. Plot a second set of data against the right y-axis and set the limits for the right y-axis.

x = linspace(0,10);
y = sin(3*x);
yyaxis left
plot(x,y)

z = sin(3*x).*exp(0.5*x);
yyaxis right
plot(x,z)
ylim([-150 150])

% Copyright 2012 The MathWorks, Inc.