MATLAB: Warning: Matrix is singular to working precision.

MATLABmatrix is singular to working precision.surface plotting

Hello, I am trying to create a surface plot with the following equations but I keep getting the message "Warning: Matrix is singular to working precision." and I'm not sure what to do.
clear
clc
x=(0:1:4);
y=(-2:1:2);
[xx,yy]=meshgrid(x,y);
ox = (-2/pi)*(xx.^3/((xx.^2+yy.^2).^2));
oy = (-2/pi)*((xx.*yy.^2)/((xx.^2+yy.^2).^2));
txy = (-2/pi)*((xx.^2.*yy)/((xx.^2+yy.^2).^2));
zz = sqrt(((ox-oy)./2).^(2)+txy.^(2));
surf(xx,yy,zz);
xlabel('Particle position in the x-axis (m)')
ylabel('Particle position in the y-axis (m)')
zlabel('Electric Potential')
title('Electric Field')
view(45,25)
colormap jet
h = colorbar;
ylabel(h, 'Electric Potential')

Best Answer

See this documentation page for an explanation of the difference between the / and ./ operators.