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

1 visualización (últimos 30 días)
Greetings,
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,

Respuestas (1)

Yifeng Tang
Yifeng Tang el 21 de Ag. de 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.

Categorías

Más información sobre Composite Components en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by