comparison toolboxes/FullBNT-1.0.7/KPMtools/bipartiteMatchingDemoPlot.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 function bipartiteMatchingDemoPlot(sources, detections, a)
2
3 hold on
4 p1 = size(sources,2);
5 p2 = size(detections,2);
6 for i=1:p1
7 h=text(sources(1,i), sources(2,i), sprintf('s%d', i));
8 set(h, 'color', 'r');
9 end
10 for i=1:p2
11 h=text(detections(1,i), detections(2,i), sprintf('d%d', i));
12 set(h, 'color', 'b');
13 end
14
15 if nargin < 3, return; end
16
17 for i=1:p1
18 j = a(i);
19 if j==0 % i not matched to anything
20 continue
21 end
22 line([sources(1,i) detections(1,j)], [sources(2,i) detections(2,j)])
23 end
24 axis_pct;