How to read and plot the value against time till the condition if false
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Ingrid
2015 年 6 月 12 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Data Exploration についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!