필터 지우기
필터 지우기

Is it possible to use of Matlab functions that do not support code generation in matlab.System objects?

조회 수: 4 (최근 30일)
I am working on developing a matlab.System and would like to leverage the speed advantage of running the model in complied mode.
The matlab engine interaction with the matlab.System object is described in - https://www.mathworks.com/help/simulink/ug/simulink-engine-interaction-with-system-objects.html
In order to maintain generality of code (i.e. I have a parent model superclass which specifies methods used by several subclasses - models that share a common framework), I need to use functions like metaclass that do not support code generation.
Is it possible to use functions such as metaclass in some of the implementation methods?

답변 (1개)

Amal Raj
Amal Raj 2024년 6월 4일
Hi Rajmohan.
No, you cannot directly use functions like metaclass inside methods of a matlab.System object because they are not compatible with code generation. Code generation is a critical feature of Simulink simulations, allowing compiled code for faster execution. Functions like metaclass rely on runtime introspection which isn't available in compiled code.

카테고리

Help CenterFile Exchange에서 Create System Objects에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by