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)
solved What can I use MATLAB function “Plot3D”? [closed]