Home > eeg > egis > egis_file_utils > copy_hdr_to_file.m

copy_hdr_to_file

PURPOSE ^

status=copy_hdr_to_file(infname,outfname)

SYNOPSIS ^

function status=copy_hdr_to_file(infname,outfname)

DESCRIPTION ^

status=copy_hdr_to_file(infname,outfname)

Writes and EGIS file header to a new file.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function status=copy_hdr_to_file(infname,outfname)
0002 %status=copy_hdr_to_file(infname,outfname)
0003 %
0004 %Writes and EGIS file header to a new file.
0005 
0006 %Use this code for batch processing
0007 infid=fopen(infname);
0008 if infid == -1, error('Fuck up opening input file.');, end
0009 
0010 [fhdr,chdr,ename,czeros,cgains,cnames,fcom,ftext]=rd_ses_hdr_v(infid);
0011 
0012 %Use this code for batch processing
0013 outfid=fopen(outfname,'w');
0014 if outfid == -1
0015     if infid ~= -1 
0016         status=fclose(infid)
0017     end
0018     error('Fuck up opening output file.');
0019 end
0020 
0021 status=wt_ses_hdr_v(outfid,fhdr,chdr,ename,czeros,cgains,cnames,fcom,ftext);
0022 
0023 status=fclose('all');

Generated on Wed 20-Sep-2023 04:00:50 by m2html © 2003