Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Getting data from an equation using mathematica

  1. Apr 5, 2012 #1
    how can I get data from a certain equation using Mathematica in order to plot them using matlab command (imagesc) !!
  2. jcsd
  3. Apr 5, 2012 #2


    User Avatar
    Gold Member

    Take your function and create a table over the range of variables you want.

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

    Then export that data

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

    This is a Matlab matrix filetype that you can then import into matlab.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook