How does one make clickable links to execute MATLAB commands from Simulink?

11 ビュー (過去 30 日間)
Abdul Basith Ashraf
Abdul Basith Ashraf 2020 年 11 月 5 日
コメント済み: Fangjun Jiang 2020 年 11 月 5 日
When I annotate the following line in Simulink
<a href="matlab:1+1">add</a>
I get it in text form. It doesnt even get converted into a link let alone run the Matlab command.
How does one make clickable links in Simulink? I have seen them in almost all of the Simulink examples.
I searched a lot. Where is the documentation for this? It is really frustrating.
  1 件のコメント
Fangjun Jiang
Fangjun Jiang 2020 年 11 月 5 日
this string works in MATLAB Command Window. Copy and past the above string in MATLAB and hit return. You will see an error message but the hyper link of "add" will be there. Click it and you get "2" as the answer.

サインインしてコメントする。

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2020 年 11 月 5 日
Run 'sl_subsys_semantics' in Command window to open the example model. Any block can be double clicked to open another model. Right click any block, select "properties..." then "Callbacks" tab, then select the "OpenFcn" and you will see a command. It could be a Simulink model name, or a MATLAB script. This is one of the ways to run a MATLAB Command in Simulink by clicking.

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by