问题描述:
matlab出错? ? Error using ==> mpower Inputs must be 2-D.
[x,y,z]=meshgrid(linspace(-3,3,120));
f=sqrt((x-5)^2+(y-6)^2+(z-7)^2)+sqrt((x-15)^2+(y-16)^2+(z-17)^2)-30;
p=patch(isosurface(x,y,z,f,0));
set(p,'FaceColor','r')
grid on
daspect([1 1 1])
view(3)
camlight('right')
camlight('left')
camlight('headlight')
lighting phong
xlabel('X')
ylabel('Y')
zlabel('Z')
title('Heart of Math')
[x,y,z]=meshgrid(linspace(-3,3,120));
f=sqrt((x-5)^2+(y-6)^2+(z-7)^2)+sqrt((x-15)^2+(y-16)^2+(z-17)^2)-30;
p=patch(isosurface(x,y,z,f,0));
set(p,'FaceColor','r')
grid on
daspect([1 1 1])
view(3)
camlight('right')
camlight('left')
camlight('headlight')
lighting phong
xlabel('X')
ylabel('Y')
zlabel('Z')
title('Heart of Math')
问题解答:
我来补答展开全文阅读