From: Matthias on
Dear All,

I wrote a small m-file that does some calculations and creates a plot based on the results. When I publish this file I would like to exclude the lines of code in which I create the plot.
In the published html-file I just would like to show the parameters, equations and so on that are needed for the results in the plot. Obviously I wish to show the plot, but I don't want to bore poeple with lots of xlim,YTick,annotation,legend... and so on.

I know, one can set "Include code" to false when publishing, but this is not want I want to do, since I wish to have most of the code visible.

Right now I get rid of the unwanted part by editing the html-file. Is there a way to exclude only certain lines of code from publishing directly in MATLAB?

Thanks a lot!
From: Steven Lord on

"Matthias " <matthias.koeppen(a)ipp.mpg.de> wrote in message
news:hodcqb$hif$1(a)fred.mathworks.com...
> Dear All,
>
> I wrote a small m-file that does some calculations and creates a plot
> based on the results. When I publish this file I would like to exclude the
> lines of code in which I create the plot.
> In the published html-file I just would like to show the parameters,
> equations and so on that are needed for the results in the plot. Obviously
> I wish to show the plot, but I don't want to bore poeple with lots of
> xlim,YTick,annotation,legend... and so on.
>
> I know, one can set "Include code" to false when publishing, but this is
> not want I want to do, since I wish to have most of the code visible.
>
> Right now I get rid of the unwanted part by editing the html-file. Is
> there a way to exclude only certain lines of code from publishing directly
> in MATLAB?

The easiest way I can think of to do this is to move the plotting commands
into a script (not a function) that's then called from the file that's being
published.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ