MATLAB Answers

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

4 ビュー (過去 30 日間)
John Harris
John Harris 2018 年 4 月 4 日
回答済み: David Tucker 2019 年 4 月 17 日
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.

  0 件のコメント

Sign in to comment.

回答 (1 件)

David Tucker
David Tucker 2019 年 4 月 17 日
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?

  0 件のコメント

Sign in to comment.


Translated by