Constructing a 3D matrix out of single column coordinate data with a corresponding value
Show older comments
Hi,
I need to analyze a 3d velocity field from tecplot. I could transfer the data into a 4 column matrix consisting of 6644672 rows. The first three columns represent that XYZ respectively, and the fourth column is the velocity data at that coordinate.
Since I want to filter this field in the future, I for now need to construct a 3d Matrix out of this imported data. It is important that no coordinates get lost, that the velocity value stays at the right coordinate and that the coordinates are oriented in the right way to eachother.
The challenging thing for me was that the coordinates in the 4 column matrix are not ordered in some logical way.
Can someone help me?
2 Comments
Catalytic
on 28 Mar 2024
What would the voxels of the 3D matrix contain, and how would those contents be related to the imported data?
Emil Litjens
on 28 Mar 2024
Accepted Answer
More Answers (1)
If you are trying to query velocity values at arbitrary 3D locations, do not use a 3D array. Instead, use scatteredInterpolant or griddata.
Categories
Find more on Geoscience 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!