From workspace block error
2 ビュー (過去 30 日間)
古いコメントを表示
I run the following code : wave.time=t; wave.signals.values = val; wave.signals.dimensions=1; where t and val are vectors. I call a simulink model and a from workspace block reads the wave structure. Then i get Undefined function or variable 'wave' error and i don't know what is wrong. Any ideas would be helpful.
2 件のコメント
TAB
2012 年 5 月 23 日
Where are you declaring wave structure, on command window OR in script OR in function?
How you are running simulink model, directly from simulink GUI or from m-file?
採用された回答
TAB
2012 年 5 月 23 日
Vaiables declared in a fucntion remains within the function scope, while by default simulink resolve the parameters from base workspace. So either declare the variables in the base workspace or change the parameter source for model to current m-function using simset command.
その他の回答 (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!