Code generation with ordered data structures of objects e.g. lists or vectors of objects
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi,
we have a problem that lend itself well to an object oriented approach, specifically we need to be able to generate C++ code using Matlab Coder/Embedded Coder with Matlab source code containing ordered datastructures of objects, e.g. lists or vectors of instantiated classes (objects) or lists or vectors of references to objects.
What is the state of Matlab code generation regarding this issue, is this possible in Matlab 2020a? If not, I would like to put this on a wishlist if it is not already on there. For us this is a highly desirable feature when working with object orientation.
Regards,
M
0 Commenti
Risposte (1)
Denis Gurchenkov
il 2 Giu 2020
As of R2020a, MATLAB Coder supports cell array of value objects, which get converted to arrays of struct in C and arrays of classes in C++. If your objects are handle objects, coder only supports fixed-size cell arrays of those.
Support of arrays of objects, including variable-sized arrays, arrays with pointers/references etc is top priority feature that MATLAB Coder development team is working on. If you have specific examples that you'd like to contribute so that the design of this feature is influenced by your input, please feel free to attach here, or pass those to the development team by contacting MathWorks technical support (just tell the support person you'd like to request this feature and ask them to pass the example to the development team).
Vedere anche
Categorie
Scopri di più su Deployment, Integration, and Supported Hardware in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!