Warning: Matrix is singular to working precision.
Ältere Kommentare anzeigen
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')
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Color and Styling finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!