Path: news.mathworks.com!not-for-mail
From: "Stefano Naclerio" <REMOVEsnbNO@SPAMiberespacio.esSPAM>
Newsgroups: comp.soft-sys.matlab
Subject: Weird publish behavior
Date: Thu, 27 Sep 2007 09:02:39 +0000 (UTC)
Organization: Ib&#233;rica del Espacio SA
Lines: 36
Message-ID: <fdfrjf$4tf$1@fred.mathworks.com>
Reply-To: "Stefano Naclerio" <REMOVEsnbNO@SPAMiberespacio.esSPAM>
NNTP-Posting-Host: webapp-06-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1190883759 5039 172.30.248.36 (27 Sep 2007 09:02:39 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 27 Sep 2007 09:02:39 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1042496
Xref: news.mathworks.com comp.soft-sys.matlab:430375


Hi everyone,

I got recently a strange behavior with the publish function.
My code creates a m-file with embedded html tags: this file
is then passed to "publish" in order to generate the html. 
The part of the code which fails is the publish command, and
it is something like 

%% Create html
options.evalCode = 'false';
options.outputDir = 'OutputPathName'; 
publish(fullfile(InputPathName,FileName),options);

Where FileName is my m-file with embedded html.

The problem I get is that if I choose to store the output in
the current directory (where all the main scripts are
located), it works; if I choose a different location it fails!! 
In both cases there is a previous routine which creates if
necessary the required directories!

The error I get is: 

??? Operands to the || and && operators must be convertible
to logical scalar values.

Error in ==> publish at 109
elseif
~strcmpi(strrep(fullPathToScript,'/',filesep),which(file))
&& ...

Any idea of the problem source?!?

Thanks everyone!

Stefano