Installation guide
8 Publishing Results
1 Add a n o verall title and introduction for the published document
a Select Cell > Insert Text Markup > > Document Title and
Introduction. MATLA B adds the following at the top of the file.
%% DOCUMENT TITLE
% INTRODUCTORY TEXT
The two percent signs (%%) indicate the start of a new cell, where a cell is
a section of an M-file. A single percent sign indicates a comment line.
b Replace DO CUME NT TITLE with Plot S ine Wave.
c On line 2, after the single percent sign, replace INTRODUCTORY TEXT
with a comment about the overall file. For exam ple, Calculate and
plot a sine wave
.
d On line 3, insert a b lank line for better readability.
Yo u can add any overall comments about the file in the lines following the
title. You cannot add executable code between document title and before
the next cell (a line starting with
%%)ifyouwantthedocumenttitleto
appear as the overall document title.
2 Display equations in comments with symbols and Greek characters using
the TeX format. For a list of symbols you can display and the character
sequence to create them, see the
String property on the MATLAB reference
page for graphics
Text Properties. In this example, to create a comment
containing the following equation in the published document:
,
use text markup as follows:
a Positionthecursorattheendofline5,wherethetextDefine the range
for x
appears.
b Select Cell > Insert Text Markup > TeX Equation.
MATLAB inserts the following lines:
%
% $$e^{\pi i} + 1 = 0$$
%
The sample equation, which is the text between the set of two dollar
signs (
$$), i s highlighted.
8-8