Why does my Constant block not accept a structure's field as input?

6 visualizzazioni (ultimi 30 giorni)
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?

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 27 Giu 2009
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.

Più risposte (0)

Categorie

Scopri di più su Interactive Model Editing in Help Center e File Exchange

Tag

Non è stata ancora inserito alcun tag.

Prodotti


Release

R2007b

Community Treasure Hunt

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

Start Hunting!

Translated by