%% yyaxis plot
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])
% Set the ytick individually
h = gca;
h.YAxis(1).TickValues = -1:.5:1;
h.YAxis(2).TickValues = -150:30:150;
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!