Controlling the operator of a relational operator block inside a protected model
조회 수: 3 (최근 30일)
이전 댓글 표시
I have a model in which a relational operator block is used. I am going to export this model as a protected model and then reference it in a reference model block in a new model. I am trying to create a mask for the reference model block through which I can let the user select the operator to be used in the relational operator block inside this locked model.
If this was not a protected model, a simple parameter promotion in the mask editor would have worked. But since this is a protected model, I am unable to do this. Is there a way to acheive this functionality? I usually create a parameter in the model workspace and set is an argument so when I export it as a protected model, I can assign values to the parameter through the mask. Is there some way to set the operator selection as a parameter? Or, is there a different way to approach this problem?
댓글 수: 0
답변 (1개)
Fangjun Jiang
2024년 1월 5일
In the model, have 5 (for example) relational operator blocks. Each block applies one of the relational operators that you want. Use a Miltiport switch block to pass the output. Define a model parameter valued from 1 to 5 to control (select) the multiport switch. This is not the most efficient but it should work out.
댓글 수: 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!