plot voxelized geometry from middle coordinates
5 views (last 30 days)
Show older comments
Hello, I would like to plot the voxelized geometry below. I have the middle coordinates of x,y,z and the corresponding dose. For middle coordinates I intend that if a voxel of the geometry is defined along the x axis from 0 to 10, its middle coordinate is 5. I am doing this but it doesn't work:
{XY=[mid_x mid_y];
Z=[mid_z dose];
surf(XY,Z);}
{
Voxelized geometry
mid_x mid_y mid_z dose
5 0,500000000000000 5 2,52298164367676
15 0,500000000000000 5 2,64519572257996
25 0,500000000000000 5 2,52241730690002
5 0,500000000000000 15 2,64528870582581
15 0,500000000000000 15 2,65645980834961
25 0,500000000000000 15 2,64508199691772
5 0,500000000000000 25 2,52284812927246
15 0,500000000000000 25 2,64546251296997
25 0,500000000000000 25 2,52243471145630
}
Thanks.
0 Comments
Accepted Answer
KSSV
on 16 Nov 2017
This is the way to proceed....but there is some problem with your data.
A = [5 0,500000000000000 5 2,52298164367676
15 0,500000000000000 5 2,64519572257996
25 0,500000000000000 5 2,52241730690002
5 0,500000000000000 15 2,64528870582581
15 0,500000000000000 15 2,65645980834961
25 0,500000000000000 15 2,64508199691772
5 0,500000000000000 25 2,52284812927246
15 0,500000000000000 25 2,64546251296997
25 0,500000000000000 25 2,52243471145630] ;
mid_x = reshape(A(:,1),3,[]) ;
mid_y = reshape(A(:,2),3,[]) ;
mid_z = reshape(A(:,3),3,[]) ;
dose = reshape(A(:,4),3,[]) ;
surf(mid_x,mid_y,mid_z,dose)
More Answers (0)
See Also
Categories
Find more on Polygons 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!