Hi all,
in GUI, I try to interuption for while loop...let's say..
a program initiate while loop when button A are pushed, and i want to stop/interupt the loop by pushing button B
> buttonA (tag=0)
----->do while loop until button B is pushed ( while tag==1 lopp ~~~)
when button B is pushed(tag=1) ---> loop stops
but the problem is once a button A is pushed and start the while-loop, it never check if the button B is pushed so the loop goes infinity..
how should I solved the problem?
i just run a while-loop and want to stop it by pushing another button.
Thanks in advance
|
|
0
|
|
|
|
Reply
|
james
|
8/22/2010 4:09:04 AM |
|
On 21/08/10 11:09 PM, james han wrote:
> in GUI, I try to interuption for while loop...let's say..
>
> a program initiate while loop when button A are pushed, and i want to
> stop/interupt the loop by pushing button B
>
>> buttonA (tag=0)
> ----->do while loop until button B is pushed ( while tag==1 lopp ~~~)
> when button B is pushed(tag=1) ---> loop stops
>
> but the problem is once a button A is pushed and start the while-loop,
> it never check if the button B is pushed so the loop goes infinity..
>
> how should I solved the problem?
See pause() and drawnow() to allow interrupts.
You might also want to look in the Matlab File Exchange (FEX) for some
of the routines to check to see if key presses are waiting.
|
|
0
|
|
|
|
Reply
|
Walter
|
8/22/2010 5:20:57 AM
|
|
|
1 Replies
514 Views
(page loaded in 0.034 seconds)
Similiar Articles: GUI, interuption while loop - comp.soft-sys.matlabHi all, in GUI, I try to interuption for while loop...let's say.. a program initiate while loop when button A are pushed, and i want to stop/in... Can I interrupt a running GUI callback? - comp.soft-sys.matlab ...GUI, interuption while loop - comp.soft-sys.matlab GUI, interuption while loop - comp.soft-sys.matlab GUI, interuption while loop - comp.soft-sys.matlab Can I interrupt a ... Advantages of for and while loops? - comp.soft-sys.matlab ...GUI, interuption while loop - comp.soft-sys.matlab Advantages of for and while loops? - comp.soft-sys.matlab ... GUI, interuption while loop - comp.soft-sys.matlab a ... While loops - comp.soft-sys.matlabGUI, interuption while loop - comp.soft-sys.matlab Hi all, in GUI, I try to interuption for while loop...let's say.. a program initiate while loop when button A are pushed ... Plot "smaller" dot - comp.soft-sys.matlabGUI, interuption while loop - comp.soft-sys.matlab Plot "smaller" dot - comp.soft-sys.matlab GUI, interuption while loop - comp.soft-sys.matlab Plot "smaller" dot - comp ... "cellfun" Is Slower Than "for" Loop - comp.soft-sys.matlab ...Conversely, your for-loop simply discards the result of 5*C{i} with each pass through the loop. Secondly, your call to cellfun must process the anonymous function ... generate/genvar, for loop and procdural (always/initial) block ...GUI, interuption while loop - comp.soft-sys.matlab generate/genvar, for loop and procdural (always/initial) block ... I've been using the Xilinx GUI to generate a quick ... Net::Telnet - How to send keystrokes like ESC - comp.lang.ruby ...Detecting key stroke - comp.soft-sys.matlab GUI, interuption while loop - comp.soft-sys.matlab Detecting a key press - comp.soft ... Net::Telnet - How to send keystrokes ... Program escape key to mouse button. - comp.cad.solidworks ...GUI, interuption while loop - comp.soft-sys.matlab... key press - comp.soft-sys.matlab GUI, interuption while loop - comp.soft-sys.matlab Detecting a key press - comp ... Help with Java serial comms - comp.lang.java.help... public void waitDSRAndWrite(byte b) { while ... Once DSR is set loop and write until it becomes cleared ... java.help Show icon in system tray - comp.lang.java.gui ... GUI, interuption while loop - comp.soft-sys.matlab | Computer GroupHi all, in GUI, I try to interuption for while loop...let's say.. a program initiate while loop when button A are pushed, and i want to stop/in... Can I interrupt a running GUI callback? - comp.soft-sys.matlab ...GUI, interuption while loop - comp.soft-sys.matlab GUI, interuption while loop - comp.soft-sys.matlab GUI, interuption while loop - comp.soft-sys.matlab Can I interrupt a ... 7/24/2012 4:22:59 PM
|