From: Walter Roberson <>
Organization: Canada Eat The Cookie Foundation
User-Agent: Thunderbird (Windows/20081209)
MIME-Version: 1.0
Newsgroups: comp.soft-sys.matlab
Subject: Re: out of memory when using a breakpoint
References: <>
In-Reply-To: <>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 31
Message-ID: <wk%fl.25670$B01.2834@newsfe13.iad>
X-Trace: newsfe13.iad 1233158556 (Wed, 28 Jan 2009 16:02:36 UTC)
NNTP-Posting-Date: Wed, 28 Jan 2009 16:02:36 UTC
Date: Wed, 28 Jan 2009 10:02:46 -0600
Xref: comp.soft-sys.matlab:514497

exabwu wrote:
> while running the code the normal way usually makes no problem I get
> an

> ??? Error using ==> zeros
> Out of memory. Type HELP MEMORY for your options.
> when I set a breakpoint within an function.

I -speculate- that you might have a variable that is not used, or perhaps even
a computation sequence which produces a result that is not used. -Possibly-
when you run normally, the Just In Time (JIT) compiler does not bother creating
the variable. When you set a breakpoint, though, because you might want to
examine any of the variables, the JIT cannot omit that variable -- and having
that variable might happen to cause you to run out of memory.

There are additional possibilities if you are running a function by putting
your cursor in the function in the editor and pressing F5: if you are
doing that, then there are situations where you could run into that kind
of problem if you have a name conflict between one of your variables and
one of the matlab routines: in such a case, when you ran "normally", the
JIT will (in some situations) call the Matlab routine instead of using
the variable of the same name {if the variable was "poofed into existance"
by load() or assignin() or eval() or similar mechanism, instead of being
the target of a visible assignment statement.}
.signature note: I am now avoiding replying to unclear or ambiguous postings.
Please review questions before posting them. Be specific. Use examples of what you mean,
of what you don't mean. Specify boundary conditions, and data classes and value
relationships -- what if we scrambled your data or used -Inf, NaN, or complex(rand,rand)?