How to run MATLAB function and Simulink model simultaneously?
14 ビュー (過去 30 日間)
古いコメントを表示
I have a MATLAB function that displays a figure I draw using annotations and I have a Simulink model that records brain signals. What I want to do is run both at the same time, that is, to record the brain signals while the user is looking at the figure displayed by my MATLAB function. When the simulation is over I would display another image from another MATLAB function. What's the best way to do this?
0 件のコメント
採用された回答
Kaustubha Govind
2013 年 7 月 12 日
You can run MATLAB code "simultaneously" with a model only by running it as part of the simulation loop. This can be done by invoking the code using one of the three MATLAB Function blocks from the User-Defined Functions Library.
To run additional code at the end of simulation, configure the model's StopFcn callback to execute the code.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Programmatic Model Editing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!