%
disp(' ');
disp(' header.m  ver 1.0  March 20, 2009 ');
disp(' by Tom Irvine   Email: tomirvine@aol.com');
disp(' ');
disp(' This script removes header lines from ');
disp(' an external ASCII text file. ');
disp(' ');
%
clear mdata;
j=1;
%
[filename, pathname] = uigetfile('*.*');
filename = fullfile(pathname, filename); 
fid = fopen(filename,'r');
%
for(i=1:10000000)
%
            clear THF;
            THF = fgets(fid);
            if(THF==-1)
                if(max(size(THF))==1)
                    break;
                end
            end
            iflag=0;
            k = findstr(THF,'a');
            if(k>=1)
                iflag=1;
            end
            k = findstr(THF,'b');
            if(k>=1)
                iflag=1;
            end
            k = findstr(THF,'c');
            if(k>=1)
                iflag=1;
            end  
            k = findstr(THF,'d');
            if(k>=1)
                iflag=1;
            end     
            k = findstr(THF,'e');
            g = findstr(THF,'e+');
            h = findstr(THF,'e-');
            if(g>=1)
            else
                if(h>=1)
                else
                    if(k>=1)
                        iflag=1;
                    end
                end
            end
            k = findstr(THF,'f');
            if(k>=1)
                iflag=1;
            end
            k = findstr(THF,'g');
            if(k>=1)
                iflag=1;
            end
            k = findstr(THF,'h');
            if(k>=1)
                iflag=1;
            end  
            k = findstr(THF,'i');
            if(k>=1)
                iflag=1;
            end     
            k = findstr(THF,'j');
            if(k>=1)
                iflag=1;
            end       
            k = findstr(THF,'k');
            if(k>=1)
                iflag=1;
            end
            k = findstr(THF,'l');
            if(k>=1)
                iflag=1;
            end
            k = findstr(THF,'m');
            if(k>=1)
                iflag=1;
            end  
            k = findstr(THF,'n');
            if(k>=1)
                iflag=1;
            end     
            k = findstr(THF,'o');
            if(k>=1)
                iflag=1;
            end       
            k = findstr(THF,'p');
            if(k>=1)
                iflag=1;
            end
            k = findstr(THF,'q');
            if(k>=1)
                iflag=1;
            end
            k = findstr(THF,'r');
            if(k>=1)
                iflag=1;
            end  
            k = findstr(THF,'s');
            if(k>=1)
                iflag=1;
            end     
            k = findstr(THF,'t');
            if(k>=1)
                iflag=1;
            end   
            k = findstr(THF,'u');
            if(k>=1)
                iflag=1;
            end
            k = findstr(THF,'v');
            if(k>=1)
                iflag=1;
            end  
            k = findstr(THF,'w');
            if(k>=1)
                iflag=1;
            end     
            k = findstr(THF,'x');
            if(k>=1)
                iflag=1;
            end     
            k = findstr(THF,'y');
            if(k>=1)
                iflag=1;
            end     
            k = findstr(THF,'z');
            if(k>=1)
                iflag=1;
            end    
            k = findstr(THF,'A');
            if(k>=1)
                iflag=1;
            end
            k = findstr(THF,'B');
            if(k>=1)
                iflag=1;
            end
            k = findstr(THF,'C');
            if(k>=1)
                iflag=1;
            end  
            k = findstr(THF,'D');
            if(k>=1)
                iflag=1;
            end     
            k = findstr(THF,'E');
            g = findstr(THF,'E+');
            h = findstr(THF,'E-');      
            k = findstr(THF,'F');
            if(g>=1)
            else
                if(h>=1)
                else
                    if(k>=1)
                        iflag=1;
                    end
                end
            end          
            k = findstr(THF,'G');
            if(k>=1)
                iflag=1;
            end
            k = findstr(THF,'H');
            if(k>=1)
                iflag=1;
            end  
            k = findstr(THF,'I');
            if(k>=1)
                iflag=1;
            end     
            k = findstr(THF,'J');
            if(k>=1)
                iflag=1;
            end       
            k = findstr(THF,'K');
            if(k>=1)
                iflag=1;
            end
            k = findstr(THF,'L');
            if(k>=1)
                iflag=1;
            end
            k = findstr(THF,'M');
            if(k>=1)
                iflag=1;
            end  
            k = findstr(THF,'N');
            if(k>=1)
                iflag=1;
            end     
            k = findstr(THF,'O');
            if(k>=1)
                iflag=1;
            end       
            k = findstr(THF,'P');
            if(k>=1)
                iflag=1;
            end
            k = findstr(THF,'Q');
            if(k>=1)
                iflag=1;
            end
            k = findstr(THF,'R');
            if(k>=1)
                iflag=1;
            end  
            k = findstr(THF,'S');
            if(k>=1)
                iflag=1;
            end     
            k = findstr(THF,'T');
            if(k>=1)
                iflag=1;
            end   
            k = findstr(THF,'U');
            if(k>=1)
                iflag=1;
            end
            k = findstr(THF,'V');
            if(k>=1)
                iflag=1;
            end  
            k = findstr(THF,'W');
            if(k>=1)
                iflag=1;
            end     
            k = findstr(THF,'X');
            if(k>=1)
                iflag=1;
            end     
            k = findstr(THF,'Y');
            if(k>=1)
                iflag=1;
            end     
            k = findstr(THF,'Z');
            if(k>=1)
                iflag=1;
            end    
            k = findstr(THF,'/');
            if(k>=1)
                iflag=1;
            end     
            k = findstr(THF,'\');
            if(k>=1)
                iflag=1;
            end     
            k = findstr(THF,'*');
            if(k>=1)
                iflag=1;
            end     
            k = findstr(THF,'%');
            if(k>=1)
                iflag=1;
            end    
            k = findstr(THF,'=');
            if(k>=1)
                iflag=1;
            end 
            k = findstr(THF,'#');
            if(k>=1)
                iflag=1;
            end  
            k = findstr(THF,'=');
            if(k>=1)
                iflag=1;
            end   
%  
            if(iflag==0)
%
                k = findstr(THF,'0');
                if(k>=1)
                    iflag=2;
                end     
                k = findstr(THF,'1');
                if(k>=1)
                    iflag=2;
                end     
                k = findstr(THF,'2');
                if(k>=1)
                    iflag=2;
                end     
                k = findstr(THF,'3');
                if(k>=1)
                    iflag=2;
                end  
                k = findstr(THF,'4');
                if(k>=1)
                    iflag=2;
                end         
                k = findstr(THF,'5');
                if(k>=1)
                    iflag=2;
                end 
                k = findstr(THF,'6');
                if(k>=1)
                    iflag=2;
                end  
                k = findstr(THF,'7');
                if(k>=1)
                    iflag=2;
                end 
                k = findstr(THF,'8');
                if(k>=1)
                    iflag=2;
                end  
                k = findstr(THF,'9');
                if(k>=1)
                    iflag=2;
                end          
            end
%
            if(iflag==2)
                clear aaa;
                aaa = sscanf(THF,'%g');
                aaa=aaa';
                mdata(j,:)=aaa;
                j=j+1;
            end
%
end
disp(' ');
disp(' Data stored in Matlab matrix:  mdata ');
disp(' ');
disp(' View mdata ?');
disp(' 1=yes  2=no ');
iv=input(' ');
if(iv==1)
    mdata
end