%**************************************************************************
%This function initializes the data file.
%
%Input:
%dat_file, data file for results
%
%Zachary Wolf, 4/2/08

function [] = util_sim_dat_init(dat_file)

%Open the data file
fid = fopen(dat_file, 'w');

%Get time and date information
%c = [y, m, d, h, mi, s]
c = fix(clock);

%Write a header to the data file
fprintf(fid, 'SLAC Magnetic Measurements\r\n');
fprintf(fid, 'Date: %02i-%02i-%4i\r\n', c(2), c(3), c(1));
fprintf(fid, 'Time: %02i:%02i:%02i\r\n', c(4), c(5), c(6));

%Close the data file
fclose(fid);

%Done
