TLC How to get values of structure parameters
Ältere Kommentare anzeigen
Hello!
I have created my own tlc file for code generation process. In simulink model I represented parameters as a structure. For example: params.K with dimension [10,2] [1,2,3,4,5,6,7,8,9,10;11,12,13,14,15,16,17,18,19,20] params.L with dimension [10] [1,2,3,4,5,6,7,8,9,10] params.M with dimension [10] [1,3,5,7,9]
In tlc file I need to get values for the parameters. When parameters are simple (not a structure) I can access parameters values in tlc file via next line:
%assign value = ::CompiledModel.ModelParameters.Parameter[idx].Value
But when parameters are represented as a structure this command gives me all values from params in one cell: { {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}, {1,2,3,4,5,6,7,8,9,10}, {1,3,5,7,9} }
The question is how can I get values of parameters represented as a structure in tlc file.
Thank you very much!
1 Kommentar
Kaustubha Govind
am 13 Jun. 2013
Could you examine the model.rtw file (select the Retain .rtw file checkbox in the Configuration Parameters window), and paste what the record corresponding to your parameter looks like. Is there any knowledge about the structure fields maintained?
Antworten (0)
Kategorien
Mehr zu Target Language Compiler finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!