How can i update data in the figure window in MATLAB GUI using pushbutton callback?
1 回表示 (過去 30 日間)
古いコメントを表示
I have MATLAB GUI, which plots data in figure using pushbutton callback
Even though the figure window is updating the data for every iteration inside the for loop, it is not able to hold and display the data from previous iteration of the for loop.
I have tried 'hold on' option but it does not work for the GUI case
How can i fix it.
6 件のコメント
採用された回答
Jan
2018 年 11 月 23 日
編集済み: Jan
2018 年 11 月 23 日
Instead of hold on prefer to create the axes with the wanted "accumulation" flag directly:
axes('NextPlot', 'add')
Now new line objects created by plot() do not replace the existing contents, but are added. Do this before the loop.
Does this help already?
その他の回答 (0 件)
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!