Path: news.mathworks.com!not-for-mail
From: "Matthew Sullivan" <nospam@nospam.no>
Newsgroups: comp.soft-sys.matlab
Subject: Strange errors
Date: Fri, 26 Oct 2007 14:46:32 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 33
Message-ID: <ffsuk8$331$1@fred.mathworks.com>
Reply-To: "Matthew Sullivan" <nospam@nospam.no>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1193409992 3169 172.30.248.38 (26 Oct 2007 14:46:32 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 26 Oct 2007 14:46:32 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1142155
Xref: news.mathworks.com comp.soft-sys.matlab:434788



I've been running in to a strange MATLAB script problem that
I don't quite understand.  The specific error I get is
"Subscript indices must either be real positive integers or
logicals."  The indices I use are real positive integers,
though. When I copy and past the offending commend in to the
MATLAB command line, it executes without issue. 

The most frustrating thing is that the errors are not
repeatable.  If I clear memory and rerun, it sometimes will
work.  Other times, it seems to stop elsewhere in the
script, or at another point in the loop.  I've only recently
run in to this issue, as well.  I can sometimes get the
error running older code that I hadn't run in a long time
and had no problems with when I ran it months ago.

I assume there's something wrong with my computer or the
script I'm running.  As it appears somewhat randomly I am at
a loss for fixing it.  For completeness, here is my most
recent error message:

?? Subscript indices must either be real positive integers
or logicals.

Error in ==> track at 502
                ym = y(ymat(1:lenxn,1:lenxm));

Error in ==> deflect_stitch_2 at 103
            trt = track(xyt', trackdist, params);

lenxn = trackdist = 25