I need an help with Mathematica 8

  • Context: Mathematica 
  • Thread starter Thread starter kurt1989
  • Start date Start date
  • Tags Tags
    Mathematica
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 3K views
kurt1989
Messages
1
Reaction score
0
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
 
on Phys.org
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

velocity=Partition[Import["yourfile.csv"][[All,3]],n];

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

ListContourPlot[velocity]

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:
Bill Simpson said:
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

velocity=Partition[Import["yourfile.csv"][[All,3]],n];

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

ListContourPlot[velocity]

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.
thanks for your help... :wink::wink::wink::wink: