Access arbitrary class from MATLAB Engine interface
Mostrar comentarios más antiguos
Using the MATLAB Engine interface, it is possible to access most data types such as numerical arrays, cells, structs, etc.
Is it also possible to access arbitrary classes such as an MException? If so, how? Just access the fields using mxGetField() etc. as in the case of structs? I am interested in MException in particular.
EDIT: I tried this, but unfortunately MATLAB (not the engine program, but the MATLAB process) crashes whenever I tried to call engGetVariable() on a variable of class MException. I'm on OS X. I would appreciate any suggestions about possible workarounds. Note that because of this crash, it is simply not safe to pass arbitrary variable names to engGetVariable(). There's always a chance it would crash MATLAB.
Respuesta aceptada
Más respuestas (1)
Jing
el 19 de Feb. de 2013
0 votos
First, I'm not familiar with MATLAB Engine. If I misunderstand your question, just ignore me.
The MException object is accessible in MATLAB program. It's an object, so you can access it's property like other class. It's similar to structs. For example, you have a MException object ME, just type ME.message in the command window, you can get the message out of it.
1 comentario
Categorías
Más información sobre Call MATLAB from C en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!