How can I change a simulink "matlab function" using the command window?

5 ビュー (過去 30 日間)
Arco
Arco 2014 年 1 月 28 日
回答済み: Jacob Halbrooks 2014 年 1 月 28 日
Hi,
I have a simulink-model containing a matlab-function-block. As you know, the usual way to change that function is by double-clicking on the matlab-function-block in Simulink. Then, you can edit the function. Is there a way to set the content of a matlab-function-block directly, in a way, that does not require user-interaction?
Why do I ask? I have a matlab-script, that returns a string, that I want to use as function in the matlab-function-block. At the moment, i have to save the string to a file, copy its content and paste it into the matlab-function-block, which is quite unhandy.
Thanks, Arco

採用された回答

Jacob Halbrooks
Jacob Halbrooks 2014 年 1 月 28 日
You can get and set the code for a MATLAB Function block using the steps in Answer 102675 .

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTest Execution についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by