%% Set x-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 x-axis limits for the bottom subplot by specifying ax2 as the first input argument to xlim.

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

ax2 = subplot(2,1,2);
plot(x,y)
xlim(ax2,[0 1])

% Copyright 2015 The MathWorks, Inc.