mrgovlpnts.m 453 Bytes
Newer Older
Allan Campopiano's avatar
Allan Campopiano committed
1
2
function outPnts=mrgOvlPnts(inPnts)

3
4
disp('WARNING: This function is DEPRECATED and not supported anymore. USE AT YOUR OWN RISK!');

Allan Campopiano's avatar
Allan Campopiano committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
j=0;
for i=1:size(inPnts,1);
    if inPnts(i,2)>0;
        j=j+1;
        trmPnts(j,:)=inPnts(i,:);
    end
end

j=1;
outPnts(1,:)=trmPnts(1,:);
for i=1:size(trmPnts,1);
    if trmPnts(i,1)<outPnts(j,2);
        outPnts(j,2)=trmPnts(i,2);
    else
        j=j+1;
        outPnts(j,:)=trmPnts(i,:);
    end
end

24