How can i take a property names in cell array of char vectors without using property function?

조회 수: 3 (최근 30일)
Hi,
I'm Trying to convert matlab code into C/C++ code where i have stuck with a error named properties is not supported for code generation.
as for my understanding properties(className) displays/stores the names of the properties of matlab class into a cell array of char vectors.
Is there a way i can access and store the names of the properties of matlab class into a another variable without using properties function?
Thanks,
Vimal

답변 (1개)

Sean de Wolski
Sean de Wolski 2020년 5월 12일
편집: Sean de Wolski 2020년 5월 12일
Why do you need to the property list in the C/C++ code?
You could always just store it manually which would also let you control which properties are exposed.
classdef MyClass
properties
PropertyList = {'A', 'B'}
A
B
C
end
end

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by