comparison toolboxes/FullBNT-1.0.7/GraphViz/draw_graph_test.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 % TEST_LAYOUT Script to test some bayesian net layouts
2 %
3
4 % Change History :
5 % Date Time Prog Note
6 % 13-Apr-2000 10:40 PM ATC Created under MATLAB 5.3.1.29215a (R11.1)
7
8 % ATC = Ali Taylan Cemgil,
9 % SNN - University of Nijmegen, Department of Medical Physics and Biophysics
10 % e-mail : cemgil@mbfys.kun.nl
11
12 %bnet = mk_asia_bnet;
13 %draw_graph(bnet.dag);
14
15 % Make the following network (from Jensen (1996) p84 fig 4.17)
16 % 1
17 % / | \
18 % 2 3 4
19 % | | |
20 % 5 6 7
21 % \/ \/
22 % 8 9
23 % where all arcs point downwards
24
25 disp('plot directed')
26 clf;
27
28 N = 9;
29 dag = zeros(N,N);
30 dag(1,2)=1; dag(1,3)=1; dag(1,4)=1;
31 dag(2,5)=1; dag(3,6)=1; dag(4,7)=1;
32 dag(5,8)=1; dag(6,8)=1; dag(6,9)=1; dag(7,9) = 1;
33
34 draw_graph(dag);
35
36 pause
37 clf
38 disp('plot undirected')
39 udag = [dag+dag'];
40 draw_graph(udag);
41
42 pause
43 clf
44 disp('plot mixed')
45 mg = [dag];
46 mg(2,1) = 1; mg(8,5) = 1;
47 draw_graph(mg);
48
49
50