About embedded function inside simulink
2 ビュー (過去 30 日間)
古いコメントを表示
I am stranger in simulink. Cp=5193 is just a number. 'Cp' is globally declared in Matlab embedded function.It is defined as signal in model explorer with datatype ->double, complexity-> real, dimension->2 In edit -> data port manager -> it is defined as parameter with size [1 1]
Error:
1.Expression 'Cp' for initial value of data 'Cp' (#61) must evaluate to a numeric or logical.
2.Error reported by S-function 'sf_sfun' in 'PBR_Temp_Xe/Embedded MATLAB Function/ SFunction ': Stateflow Suppress Error
0 件のコメント
採用された回答
Azzi Abdelmalek
2012 年 7 月 20 日
編集済み: Azzi Abdelmalek
2012 年 7 月 20 日
you can't déclare a global variable in embedded function . you have to pass it through inputs argument. for now a compiler don't allow globals variables
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Simulink Functions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!