convert C structure to matlab structure
i want to ask if there is a simple method to convert C/C++ structure to a MATLAB structure (mxArray*)
i have a mex file which returns a complex C/C++ structur开发者_运维知识库e of vectors and i want to get this as output (mxArray*)
i found the mxCreateStructArray method but its not practical in a complex structures
i am using MATLAB 7.11.0
No, there is not such simple method. You need to use mxCreateStructArray, mxAddField, etc methods and create the Matlab struct field by field.
http://www.mathworks.com/matlabcentral/newsreader/view_thread/239457
精彩评论