Path: news.mathworks.com!newsfeed-00.mathworks.com!newscon02.news.prodigy.net!prodigy.net!nx01.iad01.newshosting.com!newshosting.com!69.28.186.77.MISMATCH!hwmpeer03.lga!hwmnpeer01.lga!news.highwinds-media.com!cycny01.gnilink.net!spamkiller2.gnilink.net!gnilink.net!trndny05.POSTED!702e7bde!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Sample Matlab Engine Doesn't Work?
Message-ID: <64iht3dv5ou8htupbb01sr7t3majehnhju@4ax.com>
References: <fr9ihp$nfk$1@fred.mathworks.com>
X-Newsreader: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 19
Date: Thu, 13 Mar 2008 06:37:18 GMT
NNTP-Posting-Host: 71.102.99.244
X-Complaints-To: abuse@verizon.net
X-Trace: trndny05 1205390238 71.102.99.244 (Thu, 13 Mar 2008 02:37:18 EDT)
NNTP-Posting-Date: Thu, 13 Mar 2008 02:37:18 EDT
Xref: news.mathworks.com comp.soft-sys.matlab:456963



On Wed, 12 Mar 2008 21:39:05 +0000 (UTC), "David Doria"
<daviddoria@gmail.com> wrote:

>	engEvalString(ep, "x = 1:1:10);");

Typo, extra paren, this should be:

	engEvalString(ep, "x = 1:1:10;");

The problem with using engEvalString is you don't get any feedback
that your string is invalid. There is a heavy burdon on the programmer
to examine the string carefully to make sure it is valid syntax, the
variables used are in existence, names are spelled correctly, etc.
etc. etc. It is good practice to copy & paste these strings into the
MATLAB workspace one by one to see that they do in fact work as
expected. This avoids wasting time trying to track down a non-existent
coding error in the C++ code itself.

James Tursa