Function Call Output Simulink Modelisation

2 ビュー (過去 30 日間)
Pareil
Pareil 2018 年 4 月 4 日
コメント済み: Pareil 2018 年 4 月 5 日
Hi,
I've made a Simulink model including 2 Matlab Functions blocks as an example for learning how to use Function Call Output for an embedded MATLAB Function block.
I've added the Function Call Output (Edit data/Add/Function Call Output on Matlab). The thing is, I don't know what to do next, how do you model that on Simulink?
Thanks

採用された回答

Mark McBroom
Mark McBroom 2018 年 4 月 4 日
You can't call one MATLAB function block from another MATLAB Function block. See here. Rather than having the code for fcn1() in a MATLAB function block, do the following:
1. place the code into a file called fcn1.m. Place this file in the same directory as your simulink model or in a directory that is on the MATLAB path.
2. Delete MATLAB Function Fcn1 block
3. Modify MATLAB Function Fcn block to remove the function call fcn1 from the data dictionary.
  1 件のコメント
Pareil
Pareil 2018 年 4 月 5 日
Thank you

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInteractive Model Editing についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by