Mathematica Getting data from an equation using mathematica

  • Thread starter Thread starter Lamanova
  • Start date Start date
  • Tags Tags
    Data Mathematica
AI Thread Summary
To obtain data from a specific equation in Mathematica for plotting in MATLAB using the imagesc command, the process involves defining the function and generating a data table over the desired variable range. For example, the function F[x, y] = Sin[x 5] Sin[y 5] can be used, and a data table can be created with the command Table[F[x, y], {x, 0, 1, 0.1}, {y, 0, 1, 0.1}]. This data can then be visualized in Mathematica using ListPlot3D. To transfer the data to MATLAB, it should be exported as a MATLAB matrix file using Export["c://data.MAT", data], allowing for easy import into MATLAB for further plotting with imagesc.
Lamanova
Messages
1
Reaction score
0
how can I get data from a certain equation using Mathematica in order to plot them using MATLAB command (imagesc) !
 
Physics news on Phys.org
Take your function and create a table over the range of variables you want.

IN MATHEMATICA
F[x_,y_] = Sin[x 5] Sin[y 5];
data = Table[F[x,y],{x,0,1,0.1},{y,0,1,0.1}];
ListPlot3D[data]

Then export that data

Export["c://data.MAT", data];

This is a Matlab matrix filetype that you can then import into matlab.
 

Similar threads

Back
Top