How do I programmatically set the parameters of a Simulink-PS Converter?
Show older comments
I've got a program that generates a user-defined number of subsystems, each of which contains 1 Simulink-PS converter. I need the converters to have its Input Signal Unit dropdown equial to 'rad' and its Filtering and derivatives equal to 'Zero derivatives (pieceise constant)'. How can I go about this? The following does not work:
set_param(strcat(simFileName,'/','C_',num2str(i)), 'Units', 'rad','Filtering', 'Zero derivatives (piecewise constant)');
Accepted Answer
More Answers (1)
stozaki
on 24 Jan 2020
1 vote
Hello Isaac,
I attached example model and script.
The set_param function can change the value of only one property in one execution.
Regards,
stozaki
2 Comments
Fangjun Jiang
on 24 Jan 2020
set_param() can set multiple properties in one shot.
help set_param
stozaki
on 24 Jan 2020
I am sorry. It is misstake.
It simply changed your property name.
Categories
Find more on Simscape Multibody in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!