I need an help with Mathematica 8

  • Mathematica
  • Thread starter kurt1989
  • Start date
  • Tags
    Mathematica
In summary, the conversation discusses a problem with plotting a csv file containing coordinates and velocity data. The solution involves extracting the data and using the function ListContourPlot to obtain a velocity contour map. The conversation also mentions possible complications if the data is not in the correct order or if some points are missing.
  • #1
kurt1989
1
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
 
Physics news on Phys.org
  • #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

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:
  • #3
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:
 

1. How do I get started with using Mathematica 8?

To get started with using Mathematica 8, you can begin by familiarizing yourself with the user interface and basic functions. You can also refer to the official Mathematica documentation or online tutorials for guidance. Additionally, you can explore and experiment with the various features and capabilities of the software to gain a better understanding of its capabilities.

2. What are some common troubleshooting tips for using Mathematica 8?

If you encounter any issues while using Mathematica 8, some common troubleshooting tips include restarting the software, checking for updates, and ensuring that your system meets the minimum requirements. Additionally, you can also reach out to the official Mathematica support team for assistance.

3. How can I perform basic mathematical operations in Mathematica 8?

To perform basic mathematical operations in Mathematica 8, you can use the built-in functions such as "Plus" for addition, "Times" for multiplication, "Power" for exponentiation, and "Divide" for division. You can also use the "Evaluate" function to see the result of your operation.

4. Can Mathematica 8 handle complex mathematical calculations?

Yes, Mathematica 8 is a powerful software that can handle complex mathematical calculations. It has a wide range of built-in functions and algorithms for various mathematical operations and can also solve equations, perform symbolic calculations, and handle large datasets efficiently.

5. Is it possible to customize the appearance of graphics in Mathematica 8?

Yes, you can customize the appearance of graphics in Mathematica 8 using different options and functions. For example, you can change the color, size, and style of data points in a plot or adjust the layout and labels of a chart. You can also create your own custom graphics using the built-in drawing tools or import external graphics files.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
200
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
775
  • MATLAB, Maple, Mathematica, LaTeX
Replies
23
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
Back
Top