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 件)

カテゴリ

質問済み:

2014 年 5 月 28 日

コメント済み:

2014 年 5 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by