Thread Subject: stop button

Subject: stop button

From: Juliette Salexa

Date: 11 Jun, 2009 20:21:01

Message: 1 of 4

Does matlab have a stop button ?? So that when my program is stuck in a loop I can just click it and the program stops ?? Maple has it, so it would be a good suggestions to include in the next edition if it doesn't exist yet.

I've been trying "CTRL +C" but it's not really working

Subject: stop button

From: Doug Schwarz

Date: 11 Jun, 2009 20:38:52

Message: 2 of 4

In article <h0rovd$m6a$1@fred.mathworks.com>,
 "Juliette Salexa" <juliette.physicist@gmail.com> wrote:

> Does matlab have a stop button ?? So that when my program is stuck in a loop
> I can just click it and the program stops ?? Maple has it, so it would be a
> good suggestions to include in the next edition if it doesn't exist yet.

Yes, there should be one on your computer. It's usually labeled "Power".


> I've been trying "CTRL +C" but it's not really working

Seriously, CTRL-C is the right thing to try, but it is not possible to
interrupt a call to an internal subroutine, such as a matrix multiply or
something. The interrupt will only be serviced when that large
computation is finished and that may be a long time. If you can't wait
then you'll have to kill the whole process and lose your data,
unfortunately.

--
Doug Schwarz
dmschwarz&ieee,org
Make obvious changes to get real email address.

Subject: stop button

From: Juliette Salexa

Date: 12 Jun, 2009 17:05:02

Message: 3 of 4


> Yes, there should be one on your computer. It's usually labeled "Power".

funny

> Seriously, CTRL-C is the right thing to try, but it is not possible to
> interrupt a call to an internal subroutine, such as a matrix multiply or
> something. The interrupt will only be serviced when that large
> computation is finished and that may be a long time. If you can't wait
> then you'll have to kill the whole process and lose your data,
> unfortunately.

Okay, but it seems like the only way to kill the process (while using Windows) to close MATLAB, which means we have to reopen everything - which could be several m-file editor windows. I'm aware that we can kill matlab in unix from the command line, but the machine at work is a windows machine.

On Maple there's a stop button (on the toolbar IN maple - similar to the toolbar in matlab that has the buttons 'new m-file', 'open file' , 'copy' , 'paste' etc) where we can just stop Maple's activity, whatever it's doing. I don't mind losing all my data, I just don't want to have to close all of matlab just because it took until after running the program for me to realize that my matrix multiplication would take 2 days.

If you're worried about users losing their data unexpectadly, after clicking the stop button matlab could say "warning, you will lose your data, are you sure you want to do this?"

Juliette

Subject: stop button

From: Jan Simon

Date: 12 Jun, 2009 20:22:01

Message: 4 of 4

Dear Juliette Salexa!

> > Yes, there should be one on your computer. It's usually labeled "Power".
> funny
Not funny. It works. This is the only way to bring your computer in a well defined status.

> > Seriously, CTRL-C is the right thing to try, but it is not possible to
> > interrupt a call to an internal subroutine, such as a matrix multiply or
> > something.
> Okay, but it seems like the only way to kill the process (while using Windows) to close MATLAB, which means we have to reopen everything - which could be several m-file editor windows.

You can kill Matlab from the taskmanager, which can be started through the context menu of the taskbar.
You can configure Matlab such that it opens the same windows, which have been open during the last **regular** exit -- killing Matlab through the taskmanager does not allow Matlab to store the current status.

> On Maple there's a stop button [...] realize that my matrix multiplication would take 2 days.
It is easy to achive this in Matlab also: The status of Ctrl-C is checked, whenever DRAWNOW or PAUSE is called. So replace the matrix multiplication with a similar method, which calls DRAWNOW after processing each row. Unfortuanely this would slow down Matlab dramatically.

There have been several discussions about that in the last year. Looking for "Ctrl-C" in this NewsGroup might give you more informations.

Good luck, Jan

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
stop button Sprinceana 22 Jun, 2009 06:59:05
stop Sprinceana 22 Jun, 2009 06:59:05
button Sprinceana 22 Jun, 2009 06:59:05
rssFeed for this Thread

Contact us at files@mathworks.com