rnp
rnp

Reputation: 65

Generating a 3D figure in matlab

I want to generate a figure from a 3D dataset which has values in the range [-1,1]. I want all the positive values to be in one color and the negative values to be in blank space.

I could generate this: this

using isosurface and patch with:

figure(1); clf;
p1=patch(isosurface(xx,yy,zz,real(u),0.));
set(p1,'FaceColor','r','EdgeColor','none'); daspect([1 1 1])
camlight;lighting phong; box on; axis image;
view(45,45);

I want to generate a figure similar to this: this

Here is the drive link for u.mat used in my code.

Upvotes: 1

Views: 45

Answers (0)

Related Questions