How do I generate grt code with a global parameter in the Index of the Selector
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I would like to generate the grt.tlc code for a model that inludes Selector. The index of the Selector is defined using a variable/parameter, which is desirably to be included in the Global parameter -> Setting/Optimization/Signal and Parameter/Configure. I am receive a error message if I am trying to generate the code with this variable defined in the Global parameter. I don't need it to be tunable during runtime, but need it for initialization. How should I setup the congifuration? An example is attached.
### Starting build procedure for model: untitled_v4_nontunablePara
Code Generation 1
Elapsed: 0.360 sec
### Build procedure for model: 'untitled_v4_nontunablePara' aborted due to an error.
For dimensions 1: invalid setting in 'untitled_v4_nontunablePara/Selector3' for parameter 'Indices'.
0 个评论
回答(1 个)
Shiva Kalyan Diwakaruni
2020-12-17
Hi ,
To initialize variable first you can -
1)open the model explorer
2)Go to Model Workspace
3)choose matlab code from data source drop down
4)type nb_Cap=30;
5)give nb_Cap as argument in Model Arguments text box.
6)click apply
7)generate code
hope it helps,
thanks
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!