How to mask a boolean parameter with a popup?
1 次查看(过去 30 天)
显示 更早的评论
Hello,
I am trying to mask a simulink block and I am having some trouble. I want to mask a boolean parameter, that is, its value should be either '0' or '1', and any other value should be banned.
I want to use the "popup" parameter type, because in my particular case the "checkbox" would be a bit strange for the user, and I cannot limit the usage of the "edit" to '0' or '1'. So I decided to use the "popup" type, and set two possible values, 0 and 1. But in the "popup" type, if I check the "evaluate" checkbox, the value is always set to 1 independently of what the user chooses in the mask (I think that that happens because 0 is the first value and 1 is the second, and in a boolean parameter every value different to 0 is set to 1). On the other side, if I do not check the "evaluate" checkbox, the following error happens: " Invalid setting in 'BooleanSaboteur_test/StuckAt/StuckValue' for parameter 'Value'". So summarizing, the question is: Does anybody know how to set a mask popup parameter for a boolean parameter?
Thanks in advance.
0 个评论
回答(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!