%% Specify Axes for Stairstep Plots
% Create a figure with two subplots and return the two axes handles, s(1) and s(2). Create a stairstep plot in each subplot by referring to the axes handles.

figure
s(1) = subplot(2,1,1);
s(2) = subplot(2,1,2);  

X = linspace(0,2*pi);
Y1 = 5*sin(X);
Y2 = sin(5*X);
stairs(s(1),X,Y1)
stairs(s(2),X,Y2)

% Copyright 2015 The MathWorks, Inc.