MATLAB Answers

0

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

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 件のコメント

サインイン to comment.

1 件の回答

回答者: 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 件のコメント

サインイン to comment.



Translated by