How to make a method extrinsic
2 次查看(过去 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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Model Editing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!