Plotting in Matlab
You can build two shapes in separate windows:
figure(1)
% do plotting
figure(2)
% do plotting
or in subheadings:
figure(1)
subplot(1, 2, 1)
% do plotting
subplot(1, 2, 2)
% do plotting
For more information, you can see the MATLAB docs for drawing functions and subtask (in the help menu).
To print images to a file, see the documentation for the print function. Or just go to File → Save As and select the desired image type.
a source to share
Call figure
before call surf
. figure
opens a new shape window. When you call surf
it will display the currently selected digit.
You can copy the shapes to Word or Powerpoint using the Edit-> Copy Figure menu in the picture window. If in, say Word, you click on the inserted shape and select "ungroup", you can even go in and edit the shape.
To save, you choose "Save As ..." from the "File" menu in the picture window. For Adobe Illustrator save as .eps (works better than .ai).
a source to share
Execute hold on
to hold the current drawing. New plots will be added to existing plots. Use hold off
to change it to the previous behavior.
In addition to the command print
(see Drew Hall's answer), you can export to other formats via the File menu, or use the Copy Picture function in the edit menu. If you want to paste it into Word or Powerpoint, you can get better results if you use "Paste Special" instead of the usual paste.
a source to share