simulink - how to create a function within a function

5 ビュー (過去 30 日間)
Daniel
Daniel 2013 年 11 月 4 日
コメント済み: Daniel 2013 年 11 月 4 日
Hi,
I have a problem with creating an Embedded Matlab Function (Matlab 7), lets say function 1, which uses another function (function 2) in the workspace (that is an m-file). Function 2 uses another m-file function.
I get an error: 'Undefined function or variable function 2. The first assignment to a local variable determines its class. Inputs, outputs, and parameters inherit their class from the model explorer.#
Have you got any idea how can solve this? Cheers
  2 件のコメント
Jonathan LeSage
Jonathan LeSage 2013 年 11 月 4 日
Could you post your embedded matlab code and the code of function 2? I'm trying to get an idea of what might be going wrong.
Daniel
Daniel 2013 年 11 月 4 日
Hi,
I've solved this problem by putting all subfunctions in one Embedded Function Block. But thanks anyway.
Cheers

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Environment Customization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by