How do I run a program (.m) from simulink (.mdl) using a button?
3 ビュー (過去 30 日間)
古いコメントを表示
Hi every body
I would run a program (.m) from my model simulink (.mdl) using a button.
Do you have any idea?
Thank you
0 件のコメント
採用された回答
Kye Taylor
2012 年 12 月 5 日
編集済み: Kye Taylor
2012 年 12 月 5 日
One approach (short version):
Add an annotation to your model, and write the command invoking your program in the annotation's properties' ClickFcn.
For more details, type
doc simulink.annotation
and look at the ClickFcn property.
(long version) Open your model, and double click anywhere on the background. This will add a annoation and a blinking cursor. Type in your annotation and hit escape to stop entering text. Right-click on the annotation and select Properties from the context menu. There is a text area (ClickFcn) to specify the commands to be executed when the annotation is clicked by a user.
0 件のコメント
その他の回答 (1 件)
参考
カテゴリ
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!