- eng.getfield(tr, 'Base'). This getfield function is designed for structure, and it works for class but may not work in the future.
- eng.subsref(tr, {'type':'.','subs':'Base'}). This usage is a little tedious but should work in long term.
- Add a get method to the class for each property to be accessed by Python.
Accessing matlab object properties from Python
조회 수: 14 (최근 30일)
이전 댓글 표시
I'm compiling a matlab handle object and instantiating it from Python using the Matlab Compiler Runtime.
I manage to call instance methods as it is done in this example https://www.mathworks.com/help/matlab/matlab_external/use-matlab-handle-objects-in-python.html
However, how can I get properties?, i.e., from the example in the link above how do I write in Python "b = tr.Base"
댓글 수: 0
채택된 답변
Bo Li
2016년 11월 30일
I can think of following three approaches:
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 MATLAB Compiler SDK에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!