Bulleted and Numbered Lists
MATLAB allows bulleted and numbered lists in the comments. You can use this syntax to produce
bulleted and numbered lists.
%% Two Lists
%
% * ITEM1
% * ITEM2
%
% # ITEM1
% # ITEM2
%
Publishing the example code produces this output.
Text and Code Blocks
Preformatted Text
Preformatted text appears in monospace font, maintains white space, and does not wrap long lines.
Two spaces must appear between the comment symbol and the text of the first line of the
preformatted text.
Publishing this code produces a preformatted paragraph.
%%
% Many people find monospaced texts easier to read:
%
% A dot product of two vectors yields a scalar.
% MATLAB has a simple command for dot products.
23 Presenting MATLAB Code
23-10
MATLAB allows bulleted and numbered lists in the comments. You can use this syntax to produce
bulleted and numbered lists.
%% Two Lists
%
% * ITEM1
% * ITEM2
%
% # ITEM1
% # ITEM2
%
Publishing the example code produces this output.
Text and Code Blocks
Preformatted Text
Preformatted text appears in monospace font, maintains white space, and does not wrap long lines.
Two spaces must appear between the comment symbol and the text of the first line of the
preformatted text.
Publishing this code produces a preformatted paragraph.
%%
% Many people find monospaced texts easier to read:
%
% A dot product of two vectors yields a scalar.
% MATLAB has a simple command for dot products.
23 Presenting MATLAB Code
23-10
