%**************************************************************************
%This function writes a file which is intended for the analysis program MA.
%
%Input:
%file_name, name of the file to write
%z, position along the undulator (m)
%by, main field component at each z location (T)
%
%Zack Wolf, 7/25/03

function [] = util_dat_ma(file_name, z, by)

%Write a file for MA data
fid = fopen(file_name, 'w');
fprintf(fid, '%12.6f, %15.9f\r\n', [z * 1000; by]);
fclose(fid);

%Done