Simulink model parameters in workspace

Hello,
I have a Simulink model whose parameters are loaded from a .ini file. Ex: abc=1; bcd=2; def=3;...but I want the parameters to be loaded as zxy.abc=1;zxy.bcd=2;zxy.def=3.. One way to do this to change the extensions in .ini file and then change the simulink model. Now the issue I am facing is I have close to 10000 parameters and I want an easy way to do this or some other solution such that the parameters are under a tree structure in workspace and not flat and above all it is easily changed the the simulink model.

Respuestas (1)

ES
ES el 11 de Nov. de 2013

0 votos

Follow these steps,
1. Run your ini file. It will load all your variables into workspace..say abc, bcd etc.
2.Save these workspace variables into a mat file from File->Save as.
3. then use zxy=load(MatFileName); All your variables can be referenced as zxy.abc etc.

Categorías

Más información sobre Modeling en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 11 de Nov. de 2013

Respondida:

ES
el 11 de Nov. de 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by