How to change Simulink S-Function Parameters with Matlab Command

3 Ansichten (letzte 30 Tage)
Mohammad Behtash
Mohammad Behtash am 28 Jan. 2019
Bearbeitet: Fangjun Jiang am 28 Jan. 2019
Hi, I have a Simulink model with a S-Function which I would like to change it's prameters from my Matlab code before running the Simulink. I would appreciate it if someone could help me with this.
Thanks,
The image shows the S-Function block parameteres and my parameters are: Bodymass, Wheelmass, Suspring, and WheelSpring.
1.png

Antworten (1)

Fangjun Jiang
Fangjun Jiang am 28 Jan. 2019
Bearbeitet: Fangjun Jiang am 28 Jan. 2019
get_param(BlockHandle,'Parameters')
set_param(BlockHandle,'Parameters','abc')

Kategorien

Mehr zu Simulink Functions finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by