Thread Subject: terminate function call in timer or button callback

Subject: terminate function call in timer or button callback

From: Fab Braun

Date: 17 Nov, 2009 15:22:07

Message: 1 of 1

hi all!

I'm having a GUI which calls a very computation and therefore also time intesnive function.
(See also http://www.mathworks.ch/matlabcentral/newsreader/view_thread/266103)
During this the calculation the user will be showed a progress bar with a cancel button,
since I don't know any way how to terminate this computation intensive function - which is "blocking" whole matlab except the callbacks - until now i do it like this:
when the user pushes the cancel button i change a flag which will be read every now and then by the calculation algorithm, which then aborts itself (by return) when the flag is set to "stop". (but this can be in worst case only every 100 seconds, which is a far too big latency from my point of view).

Is there a more sophisticated way to programatically terminate a running function called from a GUI within another GUI-element-callback????

Thanks 4 your help!
Fab

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
erlangb HME UPI 14 Dec, 2009 07:10:58
immediately ter... Fab Braun 17 Nov, 2009 10:24:13
rssFeed for this Thread

Contact us at files@mathworks.com