%Program to read in Cenergy Files and form structure with header and data
[year,dnost,dnofi]=day_input;

fname = '13_19960202.txt'; %name of file generated by cenergy, can be changed
fid = fopen(fname,'r');
instr_date = fgets(fid);
defs = fgets(fid);
header = textscan(defs,'%s', 'delimiter', ',');
data = dlmread(fname,'',3,0);
DayFile = struct('data',data,'dataNames',header,'instrument', str2double(instr_date(2:3)),...
    'year',str2double(instr_date(5:8)), 'month',str2double(instr_date(9:10)),'day',str2double(instr_date(11:12)));

