backgroundfieldfile='TV-2006-03-16_16-12-21.dat'
[Vxb,Vyb,Vzb] = textread(backgroundfieldfile, ' %f %f %f ', 'headerlines',1);
d=(100:-2:0)';   % A 101x1 column for -1, or 51 for -2 step
Bxb=Vxb/10.; % Now in Gauss or 0.1mT
Byb=Vyb/10.;
Bzb=Vzb/10.;
for i=1:1:51
Btb(i)= sqrt(Bxb(i)^2 + Byb(i)^2 + Bzb(i)^2);
end
plot(d,Btb,'-+b')
xlabel('d [cm]');ylabel('|Backgd| [Gauss]')
grid on
title('Background Field |B|')
max(Btb)
min(Btb)

