Creating user defined class objects inside mexfunction

5 Ansichten (letzte 30 Tage)
Satheesh
Satheesh am 2 Jan. 2015
Kommentiert: AJ am 8 Jan. 2015
Hello
I need a mexfunction that can output an object of a user defined Matlab class. The object should be created inside the mexfunction and returned as lhs mxArray.
myObject = myMexFunction(a,b,c);
I'm looking for a way to create a class object inside a mexfunction, say, through Matrix C/C++ APIs. Is it possible? If not through APIs, are there other ways of doing it?
I'm using 2014a version.
I appreciate any help on this question.
Thank you
Satheesh
  1 Kommentar
AJ
AJ am 8 Jan. 2015
I too have a need to manipulate class objects inside a hand-coded mex function. I do know that old-style Matlab class definitions (using directory names beginning with '@') can be used in mex functions to access the data items, treating them like structures.
I have a particular interest in Matlab enumerations within mex files. These objects are sufficiently obfuscated to baffle my programming prowess. It seems to me that the mex API functions have not been keeping up with Matlab language development. I've been writing mex functions for nearly 20 years, and would love to see some additional mex API functions that deal with class objects (and also with function handles).
FWIW,
AJ

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by