フィルターのクリア

Plotting Acquired Data to Separate Figure Windows Continuously

1 回表示 (過去 30 日間)
Adam Zrehen
Adam Zrehen 2021 年 1 月 18 日
コメント済み: Adam Zrehen 2021 年 1 月 18 日
I want to plot continuously acquired data to separate figure windows. I've found that the execution time of the while loop increases over time when calling the axis or figure from within the while loop using an axis or figure handle. On the other hand, if I have a single figure that is set to "hold on" before while loop execution, then the timing is stable, with the exception of some stochasticity from the processor. Any suggestions how to fix this? See code below and attached images showing the timing stability when calling the axis versus not calling the axis (1.png vs 2.png).
h=figure()
hAx1 = gca;
hold on
h2=figure()
hAx2 = gca;
hold on
i=1;
tic
while i<3000
time(i,1)=toc;
if i>1
plot(hAx1,i,time(i,1)-time(i-1,1),'or')
plot(hAx2,i,time(i,1)-time(i-1,1),'or')
end
pause(0.08)
i=i+1;
end

採用された回答

Matt Gaidica
Matt Gaidica 2021 年 1 月 18 日
For these applications I have used https://www.mathworks.com/help/matlab/ref/addpoints.html with success.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Performance についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by