Path: news.mathworks.com!not-for-mail
From: "Steven Lord" <slord@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Strange errors
Date: Thu, 1 Nov 2007 23:10:24 -0400
Organization: The MathWorks, Inc.
Lines: 31
Message-ID: <fge4f0$126$1@fred.mathworks.com>
References: <ffsuk8$331$1@fred.mathworks.com> <1193884363.080919.312120@22g2000hsm.googlegroups.com> <fgdr8d$me2$1@fred.mathworks.com>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1193973024 1094 144.212.105.187 (2 Nov 2007 03:10:24 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 2 Nov 2007 03:10:24 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
Xref: news.mathworks.com comp.soft-sys.matlab:435746




"Matthew Sullivan" <nospam@nospam.no> wrote in message 
news:fgdr8d$me2$1@fred.mathworks.com...
> ImageAnalyst <imageanalyst@mailinator.com> wrote in message
> <1193884363.080919.312120@22g2000hsm.googlegroups.com>...

*snip*

> I am 100% sure that negative is never null.  When I look at
> it, it is always a list of positive numbers.  Furthermore,
> when I just cut and past the last command it works without
> problem.
>
> I turned JIT off and I still get the randomly get these
> errors.  It has become so bad that I can't run scripts for >
> 20 files without always getting these errors.

Type "dbstop if error" without the quotes at the prompt, then run your code. 
When you receive an error, you'll enter debug mode (the K>> prompt).  From 
there, you can see the line where the error is thrown and examine the exact 
contents of the variables as they exist at the time that line is executed. 
Double-check that all the variables you use as indices on that line contain 
positive integers or logicals. Once you've finished your investigation, use 
"dbquit" to exit debug mode and "dbclear all" to remove the condition that 
caused you to enter debug mode when you received an error.

-- 
Steve Lord
slord@mathworks.com