Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Matlab engine running scripts
Date: Fri, 11 Apr 2008 00:32:02 +0000 (UTC)
Organization: Boeing
Lines: 28
Message-ID: <ftmbi2$t6i$1@fred.mathworks.com>
References: <ftm73i$enp$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1207873922 29906 172.30.248.37 (11 Apr 2008 00:32:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 11 Apr 2008 00:32:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 756104
Xref: news.mathworks.com comp.soft-sys.matlab:462347



"Chris " <chrisk@lobo.net> wrote in message 
<ftm73i$enp$1@fred.mathworks.com>...
> I am running the matlab engine from a c++ program with no
> problems as long as I eval a default matlab script like
> imagesc or fft.  scripts of my own like dosomething.m 
will
> not eval.  I did try making it a function and then eval 
and
> also just eval.  Do I need to dll the script as well?
> 
> Thanks for all your help
> 
> Chrisk

Two things.

First, the MATLAB engine starts up in the default startup 
directory, which in general may not be the same directory 
as your C++ program. Are you sure the script runs when you 
type in the name from the MATLAB startup directory?

Second, why do you think the script is not running? Does 
it produce some variables that you can't get after you try 
to run it, or plots that don't come up?  Did you double 
check the spelling of your script name?

James Tursa