%% Set y-Axis Limits for Specific Axes
% Create a figure with two subplots and assign the Axes objects to the variables ax1 and ax2. Plot the same data in each subplot. Set the y-axis limits for the bottom subplot by specifying ax2 as the first input to ylim.

x = linspace(0,10,1000);
y = sin(10*x).*exp(.5*x);
ax1 = subplot(2,1,1);
plot(x,y)

ax2 = subplot(2,1,2);
plot(x,y)
ylim(ax2,[-10 10])

% Copyright 2015 The MathWorks, Inc.