matlab 画函数图的问题函数为:z=f(x,y)=1 ; 假如 sqrt(X.^2+Y.^2) D:\matlab\toolbox\matlab\graph3d\mesh.mOn line 93 ==> hh = surface(x,y,z,'FaceColor',fc,'EdgeColor','flat','FaceLighting','none','EdgeLighting','flat');Error in ==> D:\matlab\w

来源:学生作业帮助网 编辑:六六作业网 时间:2024/05/14 03:09:05
matlab画函数图的问题函数为:z=f(x,y)=1;假如sqrt(X.^2+Y.^2)D:\matlab\toolbox\matlab\graph3d\mesh.mOnline93==>hh=su

matlab 画函数图的问题函数为:z=f(x,y)=1 ; 假如 sqrt(X.^2+Y.^2) D:\matlab\toolbox\matlab\graph3d\mesh.mOn line 93 ==> hh = surface(x,y,z,'FaceColor',fc,'EdgeColor','flat','FaceLighting','none','EdgeLighting','flat');Error in ==> D:\matlab\w
matlab 画函数图的问题
函数为:z=f(x,y)=1 ; 假如 sqrt(X.^2+Y.^2) D:\matlab\toolbox\matlab\graph3d\mesh.m
On line 93 ==> hh = surface(x,y,z,'FaceColor',fc,'EdgeColor','flat','FaceLighting','none','EdgeLighting','flat');
Error in ==> D:\matlab\work\Untitled.m
On line 8 ==> mesh(X,Y,z)

matlab 画函数图的问题函数为:z=f(x,y)=1 ; 假如 sqrt(X.^2+Y.^2) D:\matlab\toolbox\matlab\graph3d\mesh.mOn line 93 ==> hh = surface(x,y,z,'FaceColor',fc,'EdgeColor','flat','FaceLighting','none','EdgeLighting','flat');Error in ==> D:\matlab\w
这么写:
[X,Y]=meshgrid(-3:0.01:3,-3:0.01:3);
Z = sqrt(X.^2 + Y.^2);
Z(Z1) = 0;
mesh(X,Y,Z);