MATLAB: F(x,y) = xy/(x²+y²) ,(x,y)≠(0,0),  f(x,y)= 0 , x=y=0.How to draw a graphics by using Matlab.

matlab function

I mean i don't know how to express f(x,y)= 0 , x=y=0 .

Best Answer

Provided that you have symbolic maths toolbox you can use the following code :
clear; clc;
syms x y
% define function
f(x,y)=piecewise(x==0 & y==0, 0 , x*y/(x^2+y^2) )
%plot function
fsurf(f(x,y));
xlabel('x'); ylabel('y'); zlabel('f(x,y)')
This is what you should expect: