Saving MULTI-Dimensonal Structure Data: from Matalb to Mex Fortran INPUTS-
Show older comments
Gang, I can pass and save a single structure of data in my Mex fortran file. My problem is how do I save multidimensional structure data.... Right now it is only saving the LAST dimension of data...
This is what I have in my Fortran file. The problem with this is only THE LAST array of inputs gets saved in ALL indexes.
% code
Do II = 1,10
Do JJ = 1,5
tmp = mxGetField(prhs(1),JJ,'Time')
call mxCopyPtrToReal4(mxGetData(tmp),Data_Block(II,JJ)%Time,1)
EndDo
EndDo
So what happens is 'Time' is ALL the same value for ALL indexes of the Data_Block Strucure..
The II or JJ indexes doesn't seem to increment or something.... Any Help ????
Accepted Answer
More Answers (0)
Categories
Find more on Fortran with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!