Rename Parameter for Simulink Model
6 次查看(过去 30 天)
显示 更早的评论
Hi,
i have build a Simulink Model which requires about 200 parameters which are stored in a *.m file like:
"A_mu = 10; % some Parameter
epsilon = 1 % other Parameter" etc.
Now i need to copy the model because i need one "FRONT" and one "REAR" model and the two models require slightly different parameter values (at least partly).
My idea was to rename all the parameter in a way to add a index "front" and "rear", so that i have two *.m-files and can edit the values.
I found the "rename all" button in the model explorer, but so far i think i would have to rename all parameter names manually and, additionally, rename the parameter in the *.m-file.
Is there a way to automatically add that index? Or maybe is there a better way to deal with the parameters (only a few parameters are not equal for front and rear model, but if i have the same name the two models the parameters, i get some errors)
Greetings
1 个评论
Murugan C
2019-6-3
HI,
Do you want to change parameter name in .M file or Simulink model, as like below
% in .M file
front_A_mx = 10;
rear_A_mx = 12;
front_epsilon = 1
rear_epsilon = 2;
in model
could please post your error.
回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!