n=linspace(0,0,501)
count=1
for time=linspace(0,6*pi*10^(-8),200)
Ex=2*cos(10^8*time-z/sqrt(3))
Ey=-cos(10^8*time-z/sqrt(3)-pi/2)
Hx=4.59/4*cos(10^8*time-z/运弯派sqrt(3)-pi/2)%振幅扩大250倍
Hy=9.19/4*cos(10^8*time-z/sqrt(3)) %振幅扩旁贺大250倍
plot3(z,Ex,Ey,z,Hx,Hy,z,n,n,n,linspace...
(-2.5,2.5,501),n,'闹余r',n,n,linspace(-2.5,2.5,501),'r')
axis([0 50 -2.5 2.5 -2.5 2.5])
grid on
N(count)=getframe
count=count+1
end
movie(N,1,30)
x=-2:0.5:2y=-2:0.5:2[X,Y]=meshgrid(x,y)
BX=-Y./((X).^2+Y.^2)
BY=X./((X).^2+Y.^2)
quiver(X,Y,BX,BY,0.8)
title('直导线的磁场分布'衫档搭),hold on
a=0b=0
plot(a,b,'ro'或拿蠢昌,a,b,'r+')
1
clearclfq=2e-6k=9e9a=2.0b=0x=-6:0.6:6y=x
[X,Y]=meshgrid(x,y)
rp=sqrt((X-a).^2+(Y-b).^2)rm=sqrt((X+a).^2+(Y+b).^2)
V=q*k*(1./rp-1./rm)
[Ex,Ey]=gradient(-V)
AE=sqrt(Ex.^2+Ey.^2)Ex=Ex./AEEy=Ey./AE
cv=linspace(min(min(V)),max(max(V)),51)
contour(X,Y,V,cv,'r-')
%axis('毁扰州square')
title('\fontname{ 宋体 }\fontsize{11} 电偶极子的电场线与等势纤蔽线 '),hold on
quiver(X,Y,Ex,Ey,0.6,'g')
plot(a,b,'bo',a,b,'g+'李掘)
plot(-a,-b,'bo',-a,-b,'w-')
xlabel('x')ylabel('y'),hold off
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)