Print from Command Window and Editor
You can print the contents of the Command Window or a file open in the Editor or Live Editor. When you print, MATLAB creates a PDF file. Then, you can either save the file or send it to a printer.
Command Window — To print the contents of the Command Window, click the Command Window actions button
in the top-right corner of the Command Window and select Print. Alternatively, press Ctrl+P.
Editor and Live Editor — To print the current file open in the Editor or Live Editor, go to the Editor or Live Editor tab, and in the File section, click Print. Alternatively, press Ctrl+P.
In the Print to PDF dialog box that opens, specify the print options for your document. This table describes the different print options. When you are ready to print, click the Print to PDF button.
Print Option | Description |
---|---|
Paper size | Select a paper size from the list. Paper size options include
If you select the
|
Page margin | Select a page margin option from the list. Page margin options include:
If you select the |
Page orientation | Select a page orientation. Options include Portrait or Landscape. |
Page options | Select Print Selection to print only the current selection. This option is disabled if there is no selection. Select Show page numbers to include a page number on each page. |
Code options | Select Show line numbers to include a line number for each line of code. This option is only available when printing from the Editor for certain files types. Select Wrap code lines to wrap any lines that are longer than the printed page width. If this option is not selected, the line is cut off at the page boundaries. |