variable type in c code generation
显示 更早的评论
In a recursive function, the return value can be of types such as numbers, strings, or arrays. In MATLAB, this return value can be represented by one variable. However, this function cannot generate C code,because in C code, it is not possible to change the type of a variable through assignment.
In C code, it seems that a structure containing a union type could be used to address this issue, but I am unsure how to generate such a variable in code generation.
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 JSON Format 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!