% A small program which test function m_field_new
clear all;
step=0.02
I=400;
%a=0.5;
%%%%%%%%%%%%%%%
xmin=-1;
xmax=1;
rmin=-1;
rmax=1;
%%%%%%%%%%%%%%%%%%%%%%%%%
[X,R] = meshgrid (xmin:step:xmax,rmin:step:rmax);
%%%%%%%%%%%%%%%%%%%%%
[Bx,Br]=mag_field_loop(I,0.5,0,0,xmin,rmin,xmax,rmax,step);  
I=I;
Bx=Bx';
Br=Br';
B=sqrt(Bx.^2+Br.^2);
contourf(X,R,B,100);
shading flat
colormap('jet')
hold on
quiver(X,R,Bx,Br,'k')
plot(0,0.5,'*r');
plot(0,-0.5,'*r');
h=streamslice(X,R,Bx,Br);
set(h,'Color','w')
