Code generation with ordered data structures of objects e.g. lists or vectors of objects

2 ビュー (過去 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

回答 (1 件)

Denis Gurchenkov
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).
  1 件のコメント
Marcus Mårdberg
Marcus Mårdberg 2020 年 6 月 3 日
Thanks, much appreciated. Looking forward to future support for arrays of objects etc.
Regards,
M

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by