3D Binary Structure to Grid for contour plotting
Afficher commentaires plus anciens
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!
1 commentaire
Jeffrey Osborne
le 29 Mai 2014
Réponses (0)
Catégories
En savoir plus sur Surface and Mesh Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!