Creating a 3D-array out of a 2D-array

3 views (last 30 days)
Arne
Arne on 24 Nov 2014
I have a large 2D-array (31100 x 4) built up like this:
Intensity | X | Y | Z
out of this array I would like to create a 3D-array to visualize it as a 3D-image.
I would somehow have to transform the 2D into a 3D-array. Since there will be plenty of points where there is no intensity value available all of these points should be zero values.
Side information:
min(x) = -152.0120; max(x) = 161.4350; min(y) = -256.2560; max (y) = -52.3801; min(z) = -428.5920; max (z) = -152.4210;
Because of the larger number of decimal places I might have to round up. Yet, this would possibly lead to several intensities being assigned to the same coordinate combination. Logically, I would have to add up the intensities in these cases.
This makes everything really complicated.
I would be happy if someone could teach me how to transform a 2D into a 3D array with zero-values for spots without intensity values.
Thanks for reading.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!