%% Add Plot to Existing Graph
% Plot the sine function. Then, set the hold state to |on| to retain the
% current graph and add a cosine plot.

% Copyright 2015 The MathWorks, Inc.


%%
x = -pi:pi/20:pi;
y1 = sin(x);
y2 = cos(x);

plot(x,y1)
hold on
plot(x,y2)
hold off % reset hold state
