Can a block mask 'radio button' or 'pop-up' parameter be used as a chart parameter of enumerated type?

2 Ansichten (letzte 30 Tage)
Enum sets are great: they give you a pre-defined list of choices. Radio buttons and popup lists are great, too - they do the same thing.
Can a mask's radio button (or popup list) be used as an enumerated type for a chart under the block?
----------------
Use Case:
In a block mask, I would like the user to select from a predefined list of options, so I choose a radio button or pop-up mask parameter.
The problem is, the mask parameters are not converting to the enumerated types.
An Edit mask parameter allows the input to be converted to the enumerated type, but Edit doesn't allow me to guide the user's input (even when using a DataTypeStr parameter associated to the Edit parameter).
I've attached an example model. Uncomment the various examples to see what errors they produce when running the model.

Antworten (1)

David Tucker
David Tucker am 17 Apr. 2019
I think that I have a related issue. I set type options to be two possible strings MRA and TRA with a radio button. I am unable to determine what the type is under the initialization tab with
if strcmp(actType,'MRA')
sensitivity=0.7546;
elseif strcmp(actType,'TRA')
sensitivity=1.818;
end
The code is accepted but it does not actual set the sensitivity and when I run the model without an error since it does not know the value of sensitivity.
How did you resolve your issue?

Kategorien

Mehr zu Author Block Masks finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by