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

I need an help with Mathematica 8

  1. Feb 23, 2012 #1
    Hello everybody!!!
    I'm a new member and I don't know if it is the right section, but I have some problem with the software mathematica so I'm here hoping that someone can help me..

    I have a csv file and I have to plot it, but I don't know which function I have to use. The csv file contains 3 columns:the first and the second are the coordinates x y in pixels and the third is the form of the velocity vector. I need to obtain a plot that gives me the velocity countur map.

    Someone has an idea??

    Thanks to everybody
  2. jcsd
  3. Feb 23, 2012 #2
    If your spreadsheet data is in the form of
    1,1, 2
    1,2, 5
    1,3, 2
    1,4, 7
    2,1, 4
    2,2, 5
    2,3, 5
    2,4, 6
    3,1, 2
    3,2, 3
    3,3, 3
    3,4, 4
    where your x,y are in order with every point present and you have n pixels horizontally then


    which will extract your third column and format it into a rectangular matrix. Then


    should give you your velocity contour plot.

    If you have all those points, but they are not in the correct order, then you might be able to sort your rows into order, then select the last column with [[All,3]] and then ListContourPlot the result.

    If you don't have all those points and can't get them then I don't know what to tell you. You might be able to use ListInterpolation, but this is getting more and more complicated and I don't want to toss you in the deep end of the pool, yet.
    Last edited: Feb 23, 2012
  4. Feb 24, 2012 #3
    thanks for your help... :wink::wink::wink::wink:
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook