3D Binary Structure to Grid for contour plotting
Mostra commenti meno recenti
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 Commento
Jeffrey Osborne
il 29 Mag 2014
Risposte (0)
Categorie
Scopri di più su Surface and Mesh Plots in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!