From: Michael Snyder on
Hello Y'all,

I have a 200x200x200 matrix of experimental data. For a given any given plane of the cube, the matrix values are smooth and well behaved.

For example, I know from examining the data on the z planes that there is a sphere shaped region with sign transitions all around it. A single column of z data might read (… 5.4, 3.1, 1.1, -1.1 -3.3, -7.9, -3.6, -1.3, 2.4, 2.8, 5.4…). For a given center point, the x and y columns show similar patterns.

I have tried the standard plotting commands: contour, surf, mesh, meshc ,etc. I want to mine the data cube to display the 3d shapes (defined by sign transitions) that I can infer from viewing each single 2d plane.

Can someone point me in the right direction?

Thanks,

Michael
From: Matthew Whitaker on
"Michael Snyder" <sirzerp(a)mathworks.com> wrote in message <hp047n$18r$1(a)fred.mathworks.com>...
> Hello Y'all,
>
> I have a 200x200x200 matrix of experimental data. For a given any given plane of the cube, the matrix values are smooth and well behaved.
>
> For example, I know from examining the data on the z planes that there is a sphere shaped region with sign transitions all around it. A single column of z data might read (&#8230; 5.4, 3.1, 1.1, -1.1 -3.3, -7.9, -3.6, -1.3, 2.4, 2.8, 5.4&#8230;). For a given center point, the x and y columns show similar patterns.
>
> I have tried the standard plotting commands: contour, surf, mesh, meshc ,etc. I want to mine the data cube to display the 3d shapes (defined by sign transitions) that I can infer from viewing each single 2d plane.
>
> Can someone point me in the right direction?
>
> Thanks,
>
> Michael


Take a look at commands like isosurface and isonormals

Foe example:
data = rand(200,200,200);

%create a sphere in the middle
[x,y,z] = size(data);
[X,Y,Z] = meshgrid((1:x)-x/2,(1:y)-y/2,(1:z)-z/2);
distMatrix =sqrt(X.^2+Y.^2+Z.^2);
data(distMatrix < 40) = -1;


%display the sphere
p = patch(isosurface(X,Y,Z,data,-1));
isonormals(X,Y,Z,data,p);
set(p,'FaceColor','red','EdgeColor','none');
daspect([1 1 1])
view(3); axis tight
camlight
lighting gouraud

Hope this gets you going
Matt W