Save your Matlab Script and Output as PDF
When you are finished with your Matlab script, in the command window, go to File, then
choose Publish (your script).
Matlab will then execute the code and build an HTML file. We want to open this file
using Firefox or Chrome- It is located in a subfolder in the same folder as the m−file with
the name html.
If you go to the html folder and click on the relevant file, it should open in Firefox or
Chrome. Now choose Print (the menu is accessed from the button on the upper right), then
choose Print To File. Be sure the Output format is set to PDF.
A PDF version of your document is now created (probably in your home directory). The
nice thing about the PDF version is that it includes all of the figures, so I can see what you
see.
For the exam, be sure to upload both the original m−file and the PDF version of the
published file!
Be sure to leave enough time to ask if you’re not sure about how to do this!
1