Code generation with ordered data structures of objects e.g. lists or vectors of objects
조회 수: 5 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Denis Gurchenkov
2020년 6월 2일
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).
참고 항목
카테고리
Help Center 및 File Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!