How can I plot the exported ASCII file from fluent?
Show older comments
Hello,
I have exported the data (ASCII) of a plane from fluent. I want plot the data in MATLAB. It would be great if you can give an idea or share any code to do that.
In that file the data are as following:
nodenumber, x-coordinate, y-coordinate, z-coordinate, phase-2-vof
1, 2.549813583E+00, 3.150000000E+00,-2.192098192E-08, 0.000000000E+00
2, 2.569617473E+00, 3.150000000E+00,-2.192098192E-08, 0.000000000E+00
3, 2.609225254E+00, 3.150000000E+00,-2.192098192E-08, 0.000000000E+00
4, 2.648833034E+00, 3.150000000E+00,-2.192098192E-08, 0.000000000E+00
5, 2.688440814E+00, 3.150000000E+00,-2.192098192E-08, 0.000000000E+00
6, 2.728048594E+00, 3.150000000E+00,-2.192098192E-08, 0.000000000E+00
7, 2.767656374E+00, 3.150000000E+00,-2.192098192E-08, 0.000000000E+00
8, 2.807264154E+00, 3.150000000E+00,-2.192098192E-08, 0.000000000E+00
9, 2.846871934E+00, 3.150000000E+00,-2.192098192E-08, 0.000000000E+00
Accepted Answer
More Answers (1)
Ameer Hamza
on 12 Jun 2020
If this is stored in a .txt file, then you can use readtable like this
data = readtable('test.txt');
x = data.x_coordinate;
y = data.y_coordinate;
z = data.z_coordinate;
p2v = data.phase_2_vof;
12 Comments
Ameer Hamza
on 12 Jun 2020
It is not clear how x, y, and z are used to make this graph. Is there any equation for this surface, or how is it related to x, y, and z.
mathru
on 12 Jun 2020
Ameer Hamza
on 12 Jun 2020
Can you attach the complete data file?
mathru
on 12 Jun 2020
Rik
on 12 Jun 2020
How do you want to convert your 4D dataset to 2D+color?
mathru
on 12 Jun 2020
Rik
on 12 Jun 2020
That doesn't answer my question. You have x,y,z,p2v data. How should that be transformed to row,column,pixelcolor data?
Ameer Hamza
on 12 Jun 2020
As Rik mentioned, you need to show how the colors are related to x, y, and z values. Without that, the data does not make any sense.
Rik
on 12 Jun 2020
How would you do it in words? What is the meaning of your image? What do the dimensions and the colors represent?
mathru
on 12 Jun 2020
Categories
Find more on Triangulations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!