Creating user defined class objects inside mexfunction
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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
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
Respuestas (0)
Ver también
Categorías
Más información sobre Write C++ Functions Callable from MATLAB (MEX Files) en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!