MATLAB Function Reference Previous page   Next Page
grabcode

Get MATLAB code from M-files published to HTML

Syntax

grabcode('name.html') copies MATLAB code from the file name.html and pastes it into an untitled document in the Editor/Debugger. Use grabcode to get MATLAB code from demos or other published M-files when the M-file source code is not readily available. The file name.html was created by publishing name.m, an M-file script containing cells. The MATLAB code from name.m is included at the end of name.html as HTML comments.

codeString = grabcode('name.html') get MATLAB code from the file name.html and assigns it the variable codeString.

Examples

Run

and MATLAB displays

See Also

demo, publish


Previous page  gplot gradient Next page

© 1994-2005 The MathWorks, Inc.