%==================================================================
%
%
%	Function definition
%
%   This software is protected by german copyright and international treaties.             
%   Copyright 2004 Markus Junghöfer & Peter Peyk. All Rights Reserved.                     
%                                                                                          
%   THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE        
%   NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO,    
%   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE    
%   OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
%   TRADEMARKS OR OTHER RIGHTS. COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT,       
%   INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE      
%   OR DOCUMENTATION.                                                                      
%
%
%=================================================================
DefDataFilePath=SetDefPath('r','*.raw');
[NFiles,FileMat]=ReadFileNames([],DefDataFilePath,'Choose ecg raw file(s):');
[FileSizeVec]=GetFileSize(FileMat)
FileSizeVec=FileSizeVec-488284
IndVec=find(FileSizeVec==0)
for FileInd=1:length(IndVec)
	[File,Path,FilePath]=GetFileNameOfMat(FileMat,IndVec(FileInd));
	fid=fopen(FilePath,'r','b');
	fseek(fid,4,'bof');
	a0=fread(fid,122070,'float32','b');
	fclose(fid);
	SaveData(a0,[FilePath],1,[],'float32','float32');
end


	
	
