MATLAB Answers

Simscape parameters restricted to a list? Changing the underlying model of a component from a dropdown list ?

2 views (last 30 days)
Joao on 23 Jun 2020
Answered: Yifeng Tang on 21 Aug 2020
Is it possible to have simscape components with parameters restricted to a list of values instead of having a "continuous" nature ?
Additionally, is it possible to declare components with a user selectable underlying model in block , instead of having to change the source file, in a manner similar to Simscape Electrical's Diode, which has two models and the user is able to select it from a list?
Best Regards,


Sign in to comment.

Answers (1)

Yifeng Tang
Yifeng Tang on 21 Aug 2020
I think the easiest way to do the first task is to define a "mask" around the component. It's fairly easy to edit the mask and put a "popup" to define a list of values to select from.
The second one is do-able, too. You may take a look at the "Flow Rate Source (IL)" block, which is basically 4(?) blocks in one. There will be some additional work for sure. Another possibility, maybe easier, is a variant subsystem that contains two versions of the Simscape component.


Sign in to comment.




Community Treasure Hunt

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

Start Hunting!