How to read and plot the value against time till the condition if false
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Ingrid
le 12 Juin 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 commentaires
Voir également
Catégories
En savoir plus sur Data Exploration dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!