How to mask a boolean parameter with a popup?

1 visualización (últimos 30 días)
Iban
Iban el 20 de Jun. de 2012
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.

Respuestas (0)

Categorías

Más información sobre Author Block Masks en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by