i want to graph an ellipsoid with 3 sections for an ellipsoid for example i want half of the ellipsoid disapear from 3 different sides , but when i write the code, the graph that appears to me is quarter of the graph
the code:
[x, y, z] = ellipsoid(0,0,0,5.9,3.25,3.25,30);figuresubplot(2,2,1)surf(x, y, z)colormap coolhold onpatch([0,0,0,0],[-4,-4,4,4],[-4,4,4,-4],'w','FaceAlpha',0.7);patch([-6.5,-6.5,6.5,6.5],[0,0,0,0],[-4,4,4,-4],'w','FaceAlpha',0.7);patch([-6.5,6.5,6.5,-6.5],[-4,-4,4,4],[0,0,0,0],'w','FaceAlpha',0.7)axis equalhold offfilter1 = x<0subplot(2,2,2)x(filter1) = nany(filter1) = nanz(filter1) = nansurf(x,y,z)axis equalfilter2 = y<0subplot(2,2,3)x(filter2) = nany(filter2) = nanz(filter2) = nansurf(x,y,z)axis equalfilter3 = z>0subplot(2,2,4)x(filter3) = nany(filter3) = nanz(filter3) = nansurf(x,y,z)axis equal
Best Answer