How to make a method extrinsic

조회 수: 2 (최근 30일)
Vicente
Vicente 2015년 4월 30일
I'm making a symulink project that uses matlab code. In such code an object is created from information stored in a text file and then outputted to other symulink/matlab modules.
The problem is, the creation of said object requires matlab functions that can't be used even with "coder.extrinsic()", and the assignment of the object's properties occurs in the following way:
obj.(prop_name) = prop_val;
Where prop_name is a variable containing a string, and more specifically the property name which is being read from the current line of the text file, with the corresponding prop_val.
Symulink doesn't accept such statement, dispaying an error message about prop_name being non-constant.
The question is, is there any way to omit the compilation of the entire 'troublesome' method of the class used in the project? Feel free to ask for more details if needed.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by