Can a block mask 'radio button' or 'pop-up' parameter be used as a chart parameter of enumerated type?
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Author Block Masks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!