Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
out of memory when using a breakpoint

Subject: out of memory when using a breakpoint

From: exabwu

Date: 19 Jan, 2009 08:10:31

Message: 1 of 4

Hello,

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.

Rebooting the computer or restarting MATLAB doesn't help.

Many thanks, Ingo

Subject: out of memory when using a breakpoint

From: Sadik

Date: 19 Jan, 2009 14:40:17

Message: 2 of 4

exabwu <exabwu@googlemail.com> wrote in message <3951b89a-71a5-4e62-bf6d-d21b13b763c8@r37g2000prr.googlegroups.com>...
> Hello,
>
> 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.
>
> Rebooting the computer or restarting MATLAB doesn't help.
>
> Many thanks, Ingo

Hello,

I believe you have written something like this:

zeros(10000)

when you wanted to make up a column or row vector. The way to fix this is to say

zeros(10000,1);

Hope this helps.

Subject: out of memory when using a breakpoint

From: exabwu

Date: 28 Jan, 2009 09:36:37

Message: 3 of 4

On 19 Jan., 15:40, "Sadik " <sadik.h...@gmail.com> wrote:
> exabwu<exa...@googlemail.com> wrote in message <3951b89a-71a5-4e62-bf6d-d21b13b76...@r37g2000prr.googlegroups.com>...
> > Hello,
>
> > 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.
>
> > Rebooting the computer or restarting MATLAB doesn't help.
>
> > Many thanks, Ingo
>
> Hello,
>
> I believe you have written something like this:
>
> zeros(10000)
>
> when you wanted to make up a column or row vector. The way to fix this is to say
>
> zeros(10000,1);
>
> Hope this helps.


Thanks for you reply!

Actually we used MSaturation = zeros(1,2);

It only happens once in a while ?!

Subject: out of memory when using a breakpoint

From: Walter Roberson

Date: 28 Jan, 2009 16:02:46

Message: 4 of 4

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)?

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us