Cell Arrays operation in level-2 matlab S-function for code generation
1 view (last 30 days)
Show older comments
Hello
As we know that cell arrays operation for code generation is not supported in Matlab embedded function. But if the functions with cell arrays are writen in level-2 matlab S-function, it seems that it accepts cell arrays since it uses same syntax as m file does. So the functions are working fine at least under simulation enviroment.
My question is if the level-2 matlab S-function with cell arrays is supported for code generation, presumbly the tlc file has been done.
Thanks in advance.
Nick
0 Comments
Answers (2)
Titus Edelhofer
on 4 Nov 2014
Hi Nick,
yes, you can "inline" MATLAB S-functions with a .tlc file, see here. But depending on how your MATLAB code looks like (with the cell arrays) writing the .tlc file is probably not trivial.
Titus
0 Comments
Nick105
on 4 Nov 2014
1 Comment
Titus Edelhofer
on 4 Nov 2014
Hi Nick,
no, not really. It depends on what you do with your cell arrays: if it's e.g. only for lists of strings, you might implement a class that uses for code generation C routines, where you use arrays of strings inside. Not trivial though. But if you do more than that with your cells, there are not many options, sorry.
Titus
See Also
Categories
Find more on Simulink Coder in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!