Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: How to hide _some_ commands in published m-files?
Date: Thu, 9 Oct 2008 14:22:01 +0000 (UTC)
Organization: Pierburg GmbH
Lines: 24
Message-ID: <gcl429$pco$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1223562121 26008 172.30.248.35 (9 Oct 2008 14:22:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 9 Oct 2008 14:22:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 872224
Xref: news.mathworks.com comp.soft-sys.matlab:494356


Hi,

is there any kind of switch to hide a specific command in a published m-file? E.g. with a source file like this...

?
%% Demo file

% assign constants
a = 3;
b = 5;

% algorithm
c = a./b;

disp(['Result for c: ' num2str(100*c) '%']) % hide this
?

I want all commands to show up in the published file except for the disp(... command, but I want its output
?
Result for c: 60%
?
to appear.
Thanks for your thoughts,
Andres