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!