Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

convert C structure to matlab structure

Tags:

matlab

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++ structure 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

like image 802
yassine Avatar asked Sep 02 '26 20:09

yassine


1 Answers

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

like image 122
Lordalcol Avatar answered Sep 04 '26 16:09

Lordalcol



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!