Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是使用 MATLAB 的初学者。我有个问题。 功能
f(x; y) = x^2 - 4x + y^2 - y - xy
有一个局部最小值在f(3; 2) = -7。 使用 MATLAB 函数Plot3D绘制 和的z = f(x; y)曲面x \in [2:5; 3:5]y \in [1:5; 2:5].
f(3; 2) = -7
Plot3D
z = f(x; y)
x \in [2:5; 3:5]
y \in [1:5; 2:5].
可能“网格”是适合您的。有关更多信息,请参阅文档,但您可以尝试:
x=linspace(....);y=...
[x,y]=网格网格(x,y);
z= x^2 - 4*x + y^2 - y - x.*y
网格(x,y,z)