一. 三维绘图 p = : pi/: *pi; x = cos(p); y = sin(p); z = p; plot3(x,y,z) x = -:.:; %有-2为起点,2为递增步长,2为终止点 y = -:.:; [xx, yy] = meshgrid(x, y); %用于从数组x和y产生网格,两矩阵大小相同 zz = xx.*exp(-xx.^ - yy.^); [px,py] = gradient(zz,.,.); %求数值梯度函数的命令 quiver(x,y,px,py,); quiv