Prev: How to merge two matrix
Next: How to merge two matrix
From: Michael Purdy on 27 May 2010 17:34 Is there a way to implement the equivalent of ctrl-c in an m file. I want to be able to stop a while loop in a function from another function and this seems like an appropriate way to do so if it's possible. Thanks for your help. I'm definitely a new user for all those who hadn't already guessed from previous posts. Michael
From: us on 27 May 2010 17:48 "Michael Purdy" <misterman90(a)hotmail.com> wrote in message <htmogc$4on$1(a)fred.mathworks.com>... > Is there a way to implement the equivalent of ctrl-c in an m file. I want to be able to stop a while loop in a function from another function and this seems like an appropriate way to do so if it's possible. > Thanks for your help. I'm definitely a new user for all those who hadn't already guessed from previous posts. > > Michael unfortunately, what you want is not possible... us
From: Walter Roberson on 27 May 2010 17:59 Michael Purdy wrote: > Is there a way to implement the equivalent of ctrl-c in an m file. I > want to be able to stop a while loop in a function from another function > and this seems like an appropriate way to do so if it's possible. > Thanks for your help. I'm definitely a new user for all those who > hadn't already guessed from previous posts. You might find getkeynow() useful, http://www.mathworks.com/matlabcentral/fileexchange/7840 However, forcing another routine to stop is not easy without the active cooperation of the other routine, and forcing another routine to stop and having everything clean up nicely is pretty much impossible.
From: Matt Fig on 27 May 2010 19:49 cntrl+c can be implemented as an M-File, but you still won't be able to use it to stop a WHILE loop in the same way you can with your fingers on the keyboard. Why couldn't you use a BREAK and/or RETURN statement coupled with a conditional?
From: ImageAnalyst on 27 May 2010 22:46
I don't know if it's possible but probably your best bet is to check Yair's web site: http://undocumentedmatlab.com/blog/matlab-and-the-event-dispatch-thread-edt/ |