%**************************************************************************
%This function writes to a text file Bx, By, and Bz.
%
%Input:
%dat_file, data file for results
%name, name to give measurements
%bx, x-component of the field (T)
%by, y-component of the field (T)
%bz, z-component of the field (T)
%
%Zachary Wolf
%11/18/13

function hall2_anal_dat_bxyz(dat_file, name, bx, by, bz)

%Write the results to the data file
fid = fopen(dat_file, 'a');
fprintf(fid, '\r\n');
fprintf(fid, '%s\r\n', name);
fprintf(fid, 'Bx, By, and Bz:\r\n');
fprintf(fid, '    Bx           By           Bz     \r\n');
fprintf(fid, '    (T)          (T)          (T)    \r\n');
fprintf(fid, '-----------  -----------  -----------\r\n');
fprintf(fid, '%11.6f  %11.6f  %11.6f\r\n', [bx; by; bz]);
fclose(fid);

%Done
