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 ondaspect([1 1 1])view(3)caml
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/24 12:56:17
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 ondaspect([1 1 1])view(3)caml
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')
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 ondaspect([1 1 1])view(3)caml
所有 ^ 都改成 .^, 不然会认为是矩阵相乘,所以提示行列数不匹配