
load genecut.table;
tic;
g=genecut';	% tranpose matrix
h=maxmat(g,2);	% maximaum filter over the columns
p=h-g;		% difference image between maxfiltered and original
imshow(p);
q=maxpos(p,3);	% find local maxima and minima in the columns
imshow(q);
%his=sum(q');
% s=maxpos(his',4);
%for io=1:79; t(:,io)=s(:); end;
%figure;
%imshow(t);
%%%%%
%figure;
%combo(g,t);
[a,b]=maxline(q,1,1)	% do a line approximation to the maxima
[c,d]=maxline(q,-1,1)	% do a line approximation to the minima
[r,c]=size(q);
t=wrtlin(a,b,r,c);	% write the lines in the image
toc
figure;
combo(g,t);

