plot(1:10, rand(1,10), '-b');
hax1 = gca;
plot(1:20, rand(1,20), '-pr');
hax2 = gca;
f3 = figure(3)
The figure(3) object will have the plots from the first two figures as subplots. See the documentation for subplot for a full explanation and additional options.
Note that your functions will have to return the axes handles (here ‘hax1’ and ‘hax2’) as outputs so you can use them in the subplots.
Experiment with your code to get the result you want.