Save figure handle globally in Simulink
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Till Temmen
am 26 Nov. 2020
Beantwortet: Ameer Hamza
am 26 Nov. 2020
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 Kommentare
Akzeptierte Antwort
Ameer Hamza
am 26 Nov. 2020
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Annotations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!