静电场模拟实验报告
function elab1
[x,y]=meshgrid(-2:.2:2);
D1=sqrt((x+1).^2+y.^2).^3+eps;
D2=sqrt((x-1).^2+y.^2).^3+eps;
Ex=(x+1)./D1+(x-1)./D2;
Ey=y./D1+y./D2;
E=sqrt(Ex.^2+Ey.^2)+eps;
Ex=Ex./E;Ey=Ey./E;
quiver(x,y,Ex,Ey) 原文链接://shuzhiren.com/post/106730.html