I started working with Matlab production libraries: Matlab Coder and Matlab library Compiler. I have several questions
What is the difference between mxArray and mwArray? (answer below)
Is it possible to set mxArray with user predefined data? (answer below)
3. Is it possible to set mwArray with user predefined data?
4. Is it possible to run Matlab library compiler DLL from mex file?
I combined a matlab library compiler dll with matlab coder using
coder.ceval(...)
The first call to either
mlcInitializeApplication(..)
or
MY_MATLAB_LIBRARY_NAME_Initialize(..)
return false and any mwArray constructor throws an exception
Is there a problem mixing mex and mlc runtime libraries?
** btw - when I compiled the mex code to C++ everything worked.
(From Matlab) mwArray is a class (C++ concept) used to pass input and output to C++ function generated by Matlab compiler SDK This class consists of a thin wrapper around a MATLAB® array. All data in MATLAB is represented by arrays. The mwArray class provides the necessary constructors, methods, and operators for array creation and initialization, as well as simple indexing
mxArray is a C type that hold an opaque type. It can hold arrays or matrices mainly as input / output for C mex files.
** I guess that the mx initiative comes for mex and the mw initiative comes for matlab wrapper, but I'm not sure about it.
mxArray *output[];
output[0] = mxCreateNumericArray(ndim, dim, mxDOUBLE_CLASS, mxREAL);
outData = mxGetPr(yourPtr);
3. Is it possible to set mwArray with user predefined data? I don't know