Finding values within a 3D Array
58 views (last 30 days)
Show older comments
Tianchu Lu
on 16 Apr 2024 at 11:03
Answered: Tianchu Lu
on 24 Apr 2024 at 20:16
The problem I have is that I have a 3D array with the dimension of 181x361x1931. If I was to simulate a line at any point through the 3D array, is there a way to retrieve all the data that the simulated line would penetrate through and store them within a new array.
I have seen various answers that deals with a 2D array, but haven't seen anybody answer a question regarding a 3D array. I have also seen that there are various packages on Matlab that deals with Bresenham Line Algorithm in 3D matrix, but like I said the line is imaginary thus, i don;t have much of an idea of how to go about it. I was purely wondering if there is an easier way of doing such calculations.
4 Comments
Chunru
on 17 Apr 2024 at 7:46
If the 3D data array and line coordinates are known, the interp3 function can be used to retrieve the data.
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Multidimensional Arrays 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!