Is there a command to generate the parameter values for all user-defined parameters in a specific block instead of a different command for each parameter?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I know how to use the command: paramValue = get_param('Name of model/Name of block', 'Name of block parameter') to generate the value of a specific parameter for a block within a simulink model. Is there a command that generates the value of all user-defined parameters within a single block? For example, if I had a sine wave block in simulink and wanted to use matlab to generate the values of the amplitude, frequency, bias, phase, etc., I would have to write a line of code for each parameter. I want to be able to write one line of code and generate all of these values.
0 Kommentare
Antworten (1)
Kumar Pallav
am 27 Okt. 2021
Hi,
You can try the following command to get a list of block dialog parameters.
get_param('mymodel/myblock','DialogParameters')
You can get the values of any block parameter from the list by using the following command:
get_param('mymodel/myblock','ParameterName')
0 Kommentare
Siehe auch
Kategorien
Mehr zu Sources finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!