Consider the table

f[x_, y_] := x^2 + y^2;
tab = ParallelTable[{x, y, f[x, y]}, {x, -5, 5}, {y, -5, 5}];

I can produce a nice contour plot in mathematica by then writing

ListContourPlot[Flatten[tab, 1]].

However, say that I want to generate the same contour plot in another language like matlab, but I'm only given the table "tab" and not the function f[x_,y_]. How can I convert my mathematica table "tab" to a table that is useful for creating a contour plot in matlab?

  • 4
    $\begingroup$ I suggest you to read the mathematica export documentation: reference.wolfram.com/language/ref/Export I would probably export the flattened table as a .csv file and import it in matlab $\endgroup$ – Fraccalo Oct 16 '19 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.