Can I update system parameter in Simulink model as well as on Target through script?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I shall use an example to explain my problem: In script, I define a parameter 'a', as follows
a=2;
I have a model with a constant block, labelled 'Constant'. In the 'Value' parameter, I type 'a'. I then build the model to the target. Now when I enter the following command:
tg=xpc;
getparamid(tg,'Constant','Value');
Matlab can't find the parameter. When I look in the target explorer, I see the parameter listed as 'a', under block name, 'Model Parameters'. So I enter the following:
getparamid(tg,'Model Parameters','a');
aaand nothing. I would like to update a parameter in a Simulink model and the downloaded model using a script. Is there a way to do both using one workspace variable?
Thanks in advance for any responses,
Harsh
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Programmatic Model Editing 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!