3D Binary Structure to Grid for contour plotting
显示 更早的评论
Hi all,
I need to convert a 3D binary structure (1=structure, 0=no structure) to a format where it can be put into a surf command. So I think I need the X,Y,Z meshgrid coordinates of the surface of this structure, but I'm not sure how to get it. As an example of what I need, you can use the following to generate a 3D binary sphere.
[x y z] = meshgrid(-5:0.1:5, -5:0.1:5, -5:0.1:5);
r = 1;
img = sqrt(x.^2 + y.^2 + z.^2)<r;
Thanks for any help you can provide!
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!