1 function [data,size_cluster] = build_scene(caseid)
2 % [data,size_cluster] = build_scene(case)
4 % case 1: random gaussian shaped blobs.
5 % case 2: one circular plus some gaussian blob, one inside, one outside
6 % case 3: one circular plus some gaussian blob, one inside, two outside
17 a = [sigma_h*randn(1,40);sigma_v*randn(1,40)];
18 b = [s_h;s_v]*ones(1,50) + [sigma_h*randn(1,50);...
22 size_cluster = [40,50];
27 size_cluster = [80,20,20];
29 raw_data = randn(2,sum(size_cluster));
30 tmp = rand(2,size_cluster(1))-0.5;
32 [t,idt] = sort(tmp(2,:));
34 raw_data2 = [tmp(1,idt)*r_noise;...
37 data = [(radius-raw_data2(1,1:size_cluster(1))).*...
38 cos(pi*raw_data2(2,1:size_cluster(1)));...
39 (radius-raw_data2(1,1:size_cluster(1))).*...
40 sin(pi*raw_data2(2,1:size_cluster(1)))];
43 center = [0,0];sig = [1,2];
45 scb = size_cluster(1)+1;
46 scb_next = scb+size_cluster(2)-1;
47 data = [data,[center(1)+sig(1)*raw_data(1,scb:scb_next);...
48 center(2)+sig(2)*raw_data(2,scb:scb_next)]];
51 center = [radius+10,0]; sig = [1,1];
53 scb_next = scb+size_cluster(3)-1;
54 data = [data,[center(1)+sig(1)*raw_data(1,scb:scb_next);...
55 center(2)+sig(2)*raw_data(2,scb:scb_next)]];
59 size_cluster = [80,10,20,20];
61 raw_data = randn(2,sum(size_cluster));
62 tmp = rand(2,size_cluster(1))-0.5;
64 [t,idt] = sort(tmp(2,:));
66 raw_data2 = [tmp(1,idt)*r_noise;...
69 data = [(radius-raw_data2(1,1:size_cluster(1))).*...
70 cos(pi*raw_data2(2,1:size_cluster(1)));...
71 (radius-raw_data2(1,1:size_cluster(1))).*...
72 sin(pi*raw_data2(2,1:size_cluster(1)))];
75 center = [0,0];sig = [1,2];
77 scb = size_cluster(1)+1;
78 scb_next = scb+size_cluster(2)-1;
79 data = [data,[center(1)+sig(1)*raw_data(1,scb:scb_next);...
80 center(2)+sig(2)*raw_data(2,scb:scb_next)]];
83 center = [radius+25,8]; sig = [1,2.3];
85 scb_next = scb+size_cluster(3)-1;
86 data = [data,[center(1)+sig(1)*raw_data(1,scb:scb_next);...
87 center(2)+sig(2)*raw_data(2,scb:scb_next)]];
89 center = [radius+25,-6]; sig = [1.5,2.4];
91 scb_next = scb+size_cluster(4)-1;
92 data = [data,[center(1)+sig(1)*raw_data(1,scb:scb_next);...
93 center(2)+sig(2)*raw_data(2,scb:scb_next)]];
95 size_cluster = [100,10,10];
97 tmp = rand(2,size_cluster(1))-0.5;
99 [t,idt] = sort(tmp(2,:));
101 raw_data2 = [tmp(1,idt)*r_noise;...
104 data = [(radius-raw_data2(1,1:size_cluster(1))).*...
105 cos(pi*raw_data2(2,1:size_cluster(1)));...
106 (radius-raw_data2(1,1:size_cluster(1))).*...
107 sin(pi*raw_data2(2,1:size_cluster(1)))];
110 result = zeros(1,size_cluster(1));
112 % for j =1:size_cluster(1),
113 % result(j) = sum(sum(A(1:j,1:j)))/j;