Is it possible to use MATLAB commands to plot Simulink data as a model is running?
4 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2010 年 1 月 18 日
編集済み: Emmanouil Tzorakoleftherakis
2018 年 5 月 3 日
I would like to use MATLAB plot commands to augment the output capabilities of Simulink.
採用された回答
MathWorks Support Team
2013 年 10 月 18 日
This can be accomplished using a MATLAB file S-function which calls a plot command during the mdlUpdate function or mdlOutput function.
Download the attached example files:
1. sim_gui.mdl
2. sim_gui_plot.m
and place it on the MATLAB search path.
This model shows two points moving in a 2-D space, controlled by Simulink inputs.
There are a couple of things to keep in mind while doing this:
1) It is best to avoid performing a PLOT command on each iteration, since this will take significant resources and may cause flickering.
2) The 'DoubleBuffer' property of the figure should be set to 'On' to prevent flickering.
1 件のコメント
Emmanouil Tzorakoleftherakis
2018 年 5 月 3 日
編集済み: Emmanouil Tzorakoleftherakis
2018 年 5 月 3 日
The following link might be helpful:
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Event Functions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!