How to mask a boolean parameter with a popup?

조회 수: 1 (최근 30일)
Iban
Iban 2012년 6월 20일
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개)

카테고리

Help CenterFile Exchange에서 Author Block Masks에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by