% function [stripped]=striprep(infile)
%
% striprep.m takes as its input a matrix and returns the same matrix less 
% any rows whose first element is identical to the first element of
% the previous row. It calls striplin.m to strip out the unwanted rows.
%
% Written by Ari W. Epstein in November, 1992.



function [stripped] = striprep(infile)

inlength=length(infile(:,1));
a=zeros(inlength,1);
for i=2:inlength
  if infile(i,1)==infile(i-1,1)
    a(i)=1;
  end
end

b=find(a==1);

stripped=striplin(infile,b);


% What follows is a previous, slower version of the last part
% of this function, retained in case it is useful later.

%c=find(a==0);

%hitmatrix=zeros(inlength-length(b), inlength);

%for i=1:length(c)
% hitmatrix(i,c(i))=1;
%end


%stripped=hitmatrix*infile;

  
