Can I update system parameter in Simulink model as well as on Target through script?
1 view (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Programmatic Model Editing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!