MATLAB “C” DLL Errors

I'm compiling some MATLAB functions into a C DLL. The exported mlf functions return a boolean value representing whether the function succeeded or not. When the return value is false, I want to find out the error information. I couldn't find a way to do that! (other than compiling and exporting the lasterror() function).

Is there a C interface to get the last error generated by MATLAB's runtime?

Answers


Okay, let's try...

mexCallMATLABWithTrap (C and Fortran) - Call MATLAB function, user-defined M-file, or MEX-file and capture error information

#include "mex.h"

mxArray *mexCallMATLABWithTrap(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[], const char *functionName);

and

mexEvalStringWithTrap (C and Fortran) - Execute MATLAB command in caller's workspace and capture error information

#include "mex.h"

mxArray *mexEvalStringWithTrap(const char *command);

Those two things were found with Google and a guess or two. Sorry if it's a waste of time.


Need Your Help

Rails acts_as_paranoid and has_many :through

ruby ruby-on-rails-3 scope associations acts-as-paranoid

So I'm using the rails3_acts_as_paranoid gem, and having some problems controlling scope with has_many :through associations.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.