%% Convert Existing Axes into Subplot Axes
% This is embed by section.

% Copyright 2015 The MathWorks, Inc.


%% Part 1
x = linspace(1,10);
y = sin(x);
plot(x,y)
title('Sine Plot')

%% Part 2
ax1 = gca;
subplot(2,1,2,ax1)


%% Part 3
fnew = figure;
ax_copy = copyobj(ax1,fnew);
subplot(2,1,2,ax_copy)

