The print Command
To print from the MATLAB command line, use the print command and specify the appropriate device type. The syntax of the print command is:
print -devicetype -options
If you do not specify a device type, MATLAB uses the default device for your system. For example, these commands plot a sine function and print the resulting figure on your default printer.
x = -pi:0.1:pi;
plot(x,sin(x))
print
To send the output to a file rather than to a printer, the syntax is:
print -devicetype -options filename
For example, the following command creates an Encapsulated PostScript file from the current figure, includes a TIFF preview, and names the file fig1.eps.
print -deps -tiff fig1.eps
[ Previous | Help Desk | Next ]