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:
interrupt a loop

Subject: interrupt a loop

From: Mine

Date: 26 May, 2010 11:15:08

Message: 1 of 2

Hi,

 I have a big loop however at some point I would like to stop the loop, look at the results till that moment and continue again from where I interrupted it. For example a loop that will go to 100000 iteration, however it is in 5000 now and I would like to look at the results till 5000. iteration? Is it possible?

Thank you very much in advance.

Subject: interrupt a loop

From: Sean

Date: 26 May, 2010 11:29:05

Message: 2 of 2

"Mine " <taskanmine@yahoo.com> wrote in message <htivrs$s55$1@fred.mathworks.com>...
> Hi,
>
> I have a big loop however at some point I would like to stop the loop, look at the results till that moment and continue again from where I interrupted it. For example a loop that will go to 100000 iteration, however it is in 5000 now and I would like to look at the results till 5000. iteration? Is it possible?
>
> Thank you very much in advance.

a hint:
>> help dbstop
specific
>>dbstop if ...

Or you could just put an if statement in there with a useless (disp('stopped!')) line and put a break point on that line.

Tags for 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