Simulink coder can not initialized internal array
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
i have a model using legacy code to make an s-function to add an c fuinction into model, and i need set an array into it make it can calculate and change it
Here is my model below, i set an simulink object specify the variable can be trace
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/866640/image.jpeg)
I found this array can not generate for an initialize value which shoud be "uint8_T rtb_sfcnSIL_HelpPutCSigWrap[8]={0}" for a correct action.
which way could let me add for internal initialize for array?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/866645/image.jpeg)
0 Commenti
Risposte (1)
Mark McBroom
il 29 Gen 2022
Your legacy code created s-function is not correct. The input argument u1 is a scalar U16. When setting up the legacy code tool you need to set up the u1 parameter to be a vector similar to what you did for the y1 argument.
0 Commenti
Vedere anche
Categorie
Scopri di più su Simulink Coder in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!