Creating user defined class objects inside mexfunction

5 visualizaciones (últimos 30 días)
Satheesh
Satheesh el 2 de En. de 2015
Comentada: AJ el 8 de En. de 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 comentario
AJ
AJ el 8 de En. de 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

Iniciar sesión para comentar.

Respuestas (0)

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by