How to convert MATLAB variables to Simulink Parameters ?
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Dyson Freeman
am 21 Jan. 2014
Beantwortet: Dyson Freeman
am 22 Jan. 2014
I have several MATLAB vars in the base workspaces. Now I want to create Simulink.Parameter objects using the MATLAB vars' names. In another words, I wanna convert MATLAB variables to Simulink Parameters. All the operations need to be fulfilled in command line. Anyone who can give some help? Thanks !
0 Kommentare
Akzeptierte Antwort
Niklas Nylén
am 21 Jan. 2014
There may be some better way to do it, but this works. The storage class below is the one I use when I need to make a parameter tunable in a dSpace Autobox.
par = Simulink.Parameter;
par.RTWInfo.StorageClass = 'ExportedGlobal';
par.Value = myWorkspaceVariable;
myWorkspaceVariable = par;
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu String 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!