Why does my Constant block not accept a structure's field as input?
6 ビュー (過去 30 日間)
古いコメントを表示
In the base workspace I have defined the following:
k = mpt.Parameter;
k.Value = 7;
h.k = k;
If I now try to use this structure in the value field for my Constant block I receive the following error:
Expression 'h.k' for block 'testmodel/Constant' returns a Simulink.Parameter object that has property values that need to be evaluated. This object should be instantiated in a workspace and referenced by name in Simulink.
Why?
採用された回答
MathWorks Support Team
2009 年 6 月 27 日
The manner in which you are trying to use a Simulink.Parameter object has been no longer possible since Simulink 6.3 (R14SP3). More information about this can be found in the Simulink release notes for this release:
<http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/rn/bqmg7gc-1.html#bqmn6zb-1>
Please refer to the section named "Parameter Object Expressions No Longer Supported in Dialog Boxes".
If you have installed the help documentation, you may access the same page locally by typing the following at the MATLAB prompt:
web([docroot,'/toolbox/simulink/rn/bqmg7gc-1.html#bqmn6zb-1'])
The only possibility you have is to use Simulink.Parameter objects that are defined in the workspace and that can be referenced directly and not as result of an expression. There are no workarounds.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Interactive Model Editing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!