-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathtest_connect.m
More file actions
49 lines (43 loc) · 1.17 KB
/
test_connect.m
File metadata and controls
49 lines (43 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
%> @file test_connect.m
%> @brief Demo of 1/2/3-d connectivity matrix.
% ==============================================================================
% Input
% =============================================================================
clear
input = Input();
put(input, 'bc_left', 'reflect');
put(input, 'bc_right', 'reflect');
put(input, 'bc_top', 'reflect');
put(input, 'bc_bottom', 'reflect');
put(input, 'bc_north', 'reflect');
put(input, 'bc_south', 'reflect');
put(input, 'rf_order_space', 3); % Eventually, these will be the
put(input, 'rf_order_azimuth', 1);
put(input, 'rf_order_polar', 1); % orders extracted from a DB
put(input, 'number_groups', 2);
% 1-d
put(input, 'dimension', 1);
e1 = [1 2 3];
b1 = Connect(input, e1);
M1 = build(b1);
figure(1)
plot_connect(b1)
% 2-d
put(input, 'dimension', 2);
e2 = [1 1
2 1];
e2 = flipud(e2)';
b2 = Connect(input, e2);
M2 = build(b2);
figure(2)
plot_connect(b2)
% 3-d
put(input, 'dimension', 3);
e3(:, :, 1) = [1 1
1 1];
e3(:, :, 2) = [1 1
1 1];
b3 = Connect(input, e3);
M3 = build(b3);
figure(3)
plot_connect(b3)