Octave: expecting scalar N, or 2-/4-element vector DOM-ezsurf 错误

Octave: expecting scalar N, or 2-/4-element vector DOM-ezsurf Error

我需要一些有关 ezsurf 的帮助 正如我从我的研究中了解到的那样,matlab fplot 等于八度的 ezplot。我写了一个脚本

fx = @(x,y) x.*sin(y);
fy = @(x,y) -x.*cos(y);
fz = @(x,y) y;
ezsurf(fx, fy, fz,[-5 5 -5 -2],'--','EdgeColor','g')
hold on
ezsurf(fx, fy, fz,[-5 5 -5 -2],'EdgeColor','none')
hold off

如果我能够 运行 我希望看到这个图像的脚本

但是当我 运行 脚本时我得到这个错误

    error: ezsurf: expecting scalar N, or 2-/4-element vector DOM
error: called from
    __ezplot__ at line 260 column 7
    ezsurf at line 78 column 19
    file at line 4 column 1

什么是 "expecting scalar N" 我应该了解什么 我该如何解决这个问题。 非常感谢你

fx = @ (x,y)  x .*sin(y);
fy = @ (x,y) -x .*cos(y);
fz = @ (x,y)  y;

h1 = ezsurf (fx, fy, fz, [-5, 5, -5, -2]);
set (h1, 'edgecolor', 'g', 'linestyle', '--', 'linewidth', 0.1);
hold on

h2 = ezsurf (fx, fy, fz, [5, -5, 5, -2]);
set (h2, 'edgecolor', 'none');
hold off

colormap (parula (256)); % assuming you have the parula colormap installed