MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1
LaTeX equation % $$ y = y + \frac{sin(k*t)}{k} $$

NoteWhen you have a file containing text that has characters in a different encoding
than that of your platform, when you save or publish your file, MATLAB displays
those characters as garbled text.

(^3) Publish the code. On the Publish tab, click Publish.
By default, MATLAB creates a subfolder named html, which contains an HTML file
and files for each graphic that your code creates. The HTML file includes the code,
formatted comments, and output. Alternatively, you can publish to other formats,
such as PDF files or Microsoft PowerPoint presentations. For more information on
publishing to other formats, see “Specify Output File” on page 23-28.
In MATLAB Online, MATLAB publishes to either HTML or PDF, and stores the output
and supporting files in your Published folder. To allow MATLAB to open the output
automatically, enable pop-up windows in your Web browser. Results are available
publicly using a URL of the form https://matlab.mathworks.com/users/
userid/Published/filename/index.html.
The sample code that appears in the previous figure is part of the installed
documentation. You can view the code in the Editor by running this command:
edit(fullfile(matlabroot,'help','techdoc','matlab_env', ...
'examples','fourier_demo2.m'))
Add Help and Create Documentation
You can add help to your code by inserting comments at the start of a MATLAB code file.
MATLAB displays the help comments when you type help file_name in the Command
Window. For more information, see “Add Help for Your Program” on page 20-6.
You also can create your own MATLAB documentation topics for viewing from the
MATLAB Help browser or the web. For more information, see “Display Custom
Documentation” on page 30-27
See Also
publish
See Also

Free download pdf