Convert C structure to Matlab structure

I want to ask if there is an easy way to convert a C / C ++ structure to a MATLAB structure (mxArray *)

I have a mex file that returns a complex C / C ++ vector structure and I want to get this as output (mxArray *)

I found the mxCreateStructArray method, but it is not practical in complex structures

I am using MATLAB 7.11.0

+3
source share
1 answer

No, there is no such simple method. You need to use the methods mxCreateStructArray, mxAddField, etc. And create a Matlab structure field by field.

http://www.mathworks.com/matlabcentral/newsreader/view_thread/239457

+1
source

Source: https://habr.com/ru/post/1779191/


All Articles