I am new to Mathematica, if there is anything wrong, do not hesitate to tell me?

WW1 = {{0,0},{0,0},{0.532089,0.434531},{0,0},{0.812587,0.278014}};
WW2 = {{0,0},{0,0},{0.273867,0.365045},{0,0},{0.126252,0.646143}};

I would like to know how to export the data into Matfile? The I can use Matlab to plot for the figure for consistency.

I use the code:

Export["data.mat", {"WW1", "WW2"}]

However, it does not work and reports an error:

"{"WW1", "WW2"} cannot be exported to the ("MAT") format."

Could you please help me fix it?


1 Answer 1



Export["data1.mat", WW1]
Export["data2.mat", WW2]

Is that what you want?

Or combined them into a single matrix using Mathematica, then export the whole matrix. But without the double quotes.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.