入力を受け取り、matlab 関数に入力する定数ブロックを使用して値に 10 を追加し、表示ブロックに出力する組み込みの matlab 関数を使用して、非常に単純なモデルをシミュレートしようとしています。
シミュレートを押すとすぐに、大量のエラーが発生します。最初に、ソルバー'variableStepDiscrete'
ではなくソルバーに対する警告を示すオレンジ色のテキストの大きな段落が表示されます。'ode45'
コマンドプロンプトからエコーされる残りの行は次のとおりです。
Code Directory :
"/Users/dazgti/Documents/MATLAB/slprj/_sfprj/embeddedFunction/_self/sfun/src"
Machine (#32): "embeddedFunction" Target : "sfun"
Chart "MATLAB Function" (#49):
.
"c2_embeddedFunction.h"
"c2_embeddedFunction.c"
"embeddedFunction_sfun.h"
"embeddedFunction_sfun.c"
"embeddedFunction_sfun_debug_macros.h"
Interface and Support files:
"embeddedFunction_sfun_registry.c"
Code generation failed Attempt to execute SCRIPT union as a function:
/Users/dazgti/Documents/MATLAB/union.m
matlab ディレクトリ内に というスクリプト ファイルがありますが、union.m
なぜそれが言及されているのかわかりません。
function y = fcn(u)
%#codegen
x = u + 10;
y = x;