Message Boards Message Boards

Export mathematica file to a MATLAB file?

Posted 6 years ago

Hi. i'm using Mathematica version 9.0. i also works with MATLAB.

first i imported a data base from MATLAB to Mathematica with a parser that i wrote in mathematica, for reading all the fields of the data base.

after, i did some staff with the data base.

Now i want to Export the data base i have in mathematica back to MATLAB.

my dada base includs some "structs", with keys and data, and some headers.

i tried to use many version of Export commends:

Export [ "*****.mat", myDataBase]

Or

Export [******.mat, {{"var1"->Header1}, {"var2"->Header2}....},"LabeledData"] 

and so on.....

But i cannot export the data base properly. the file i export seems to be 0KB or that matlab cannot read it , or Export fails if the "var1","var2" are in different dimensions.

does anyone know what can i do? thanks

POSTED BY: Yolo Moto

You can transfer such data to MATLAB using the MATLink package. The builtin exporter does not support structs, as far as I'm aware. MATLink does.

POSTED BY: Szabolcs Horvát
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract