How to read and plot the value against time till the condition if false
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I'd like to read and plot the value T continuously in time (time counts 1 s) until the radio button will be disabled. Also necessary display the value T graph. Problems: 1 - loop doesn't stop if I disabled the radio button 2 - plot function refresh the screen each iteration and I don't see previous values. %
function insens_Callback(hObject, eventdata, handles) % the function for my radio button: if enabled, then 'value'=1, disabled -- 'value'=0;
x=1; while get(handles.insens, 'Value')==1 % so the loop continues until the disabling of the radio button
[T] = julabo_getinttemperature(s); % reading of the T sensor plot (x,T) pause(1); x=x+1; end %
Would be grateful for your help.
0 Commenti
Risposte (1)
Ingrid
il 12 Giu 2015
it seems strange to do this with a radiobutton instead of a stop pushbutton
you should check if the interruptibility of your radiobutton is set to on (standard it is off)
also use the hold on command so that the previously plotted points do not disappear when you call plot again
0 Commenti
Vedere anche
Categorie
Scopri di più su Data Exploration in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!