필터 지우기
필터 지우기

Save figure handle globally in Simulink

조회 수: 3 (최근 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 CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by