Save figure handle globally in Simulink

1 回表示 (過去 30 日間)
Till Temmen
Till Temmen 2020 年 11 月 26 日
回答済み: Ameer Hamza 2020 年 11 月 26 日
Hello guys,
i'm building a simulation with 2 plots in total. Both plots need to be refreshed (within a Matlab Function Block) with every new scan of a sensor incoming. Because i dont want to close and rebuild both plots in every Scan, i want to save both figure handles for the next iteration, so i can just clear them and plot the new data. My Question is: How can i save the figure handles globally, so i can work with them in the next call of the Matlab Function Block?
I hope you can help me.

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 11 月 26 日
That is not the current way to update handles from Simulink. I am not sure if it is even possible. Even if it is possible, it will be a very inefficient approach.
You need to use event-handles to create plots as shown in this example here: https://blogs.mathworks.com/simulink/2013/01/25/accessing-block-data-during-a-simulation/.

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by