MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1
Ways to Share Instructions
As a static document capable of being
viewed outside of MATLAB

Export the script or function to a standard
format. Available formats include PDF,
Microsoft Word, HTML, and LaTeX.

To export your live script or function to one
of these formats, on the Live Editor tab,
select Save > Export to PDF, Save >
Export to Word, Save > Export to
HTML, or Save > Export to LaTeX.

The saved file closely resembles the
appearance of your live script or function
when viewed in the Live Editor with output
inline.

When exporting to LaTeX, MATLAB creates
a separate matlab.sty file in the same
folder as the output document, if one does
not exist already. .sty files, also known as
LaTeX Style Documents, give you more
control over the appearance of the output
document.

Hide Code Before Sharing


Consider hiding the code in the live script before sharing it as an interactive or static
document. When the code is hidden, the Live Editor only displays labeled controls,
output, and formatted text.

To hide the code, click the hide code button to the right of the live script. You also can
go to the View tab, and in the View section, click Hide Code. To show the code again,

click the output inline button or the output on right button.

19 Live Scripts and Functions

Free download pdf