I’am a beginner for using MATLAB. I have a question.
The function
f(x; y) = x^2 - 4x + y^2 - y - xy
has a local minimum at f(3; 2) = -7.
Using MATLAB function Plot3D, plot the surface z = f(x; y) for x \in [2:5; 3:5] and y \in
[1:5; 2:5].
Probably the “mesh” is the one that will do for you.
See the documentation for this for more, but you can try:
x=linspace(….);y=…
[x,y]=meshgrid(x,y);
z= x^2 – 4*x + y^2 – y – x.*y
mesh(x,y,z)