How do I compile user-defined MATLAB classes using the MATLAB Compiler 4.0 (R14)?

28 Ansichten (letzte 30 Tage)
I have created a custom MATLAB class, @Person, which I want to compile into a COM or .NET object and instantiate in my driver application. However, when I try to compile the class directly, I receive errors and the compilation fails:
??? Error executing mcc, return status = 1

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 22 Okt. 2012
Including MATLAB objects in compiled applications, libraries, or components is supported, but has specific limitations. You cannot create MATLAB objects in the driver application and use them as an input to the component built with a MATLAB Compiler product. Likewise, you cannot use a MATLAB object as an output from a component and modify it in the driver application.
Instead, create a MATLAB function that instantiates the class and calls the desired methods. If you are calling it from the driver application, the inputs and outputs to this function must comprise supported data types that are not MATLAB class objects.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB Compiler SDK finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by