Save figure handle globally in Simulink
조회 수: 1 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!