1 | % Random Variables |
---|
2 | a=struct('class','RV','names',{{'a'}}); |
---|
3 | b=struct('class','RV','names',{{'b'}}); |
---|
4 | ab=struct('class','RV','names',{{'a','b'}}); |
---|
5 | |
---|
6 | % Normal densities |
---|
7 | N1a.class= 'enorm<ldmat>'; |
---|
8 | N1a.mu = 3; |
---|
9 | N1a.R = 1; |
---|
10 | N1a.rv = a; |
---|
11 | |
---|
12 | N2a = struct('class','enorm<ldmat>',... |
---|
13 | 'mu',-3,... |
---|
14 | 'R', 2,... |
---|
15 | 'rv', a); |
---|
16 | |
---|
17 | N1b.class= 'enorm<ldmat>'; |
---|
18 | N1b.mu = 7; |
---|
19 | N1b.R = 1; |
---|
20 | N1b.rv = b; |
---|
21 | |
---|
22 | % Gamma densities |
---|
23 | Ga = struct('class','egamma',... |
---|
24 | 'alpha',2,... |
---|
25 | 'beta', 2,... |
---|
26 | 'rv', a); |
---|
27 | |
---|
28 | % 2D sources |
---|
29 | %Normal |
---|
30 | Nab = struct('class','enorm<ldmat>',... |
---|
31 | 'mu',[0,2],... |
---|
32 | 'R', [2 0; 0 0.5],... |
---|
33 | 'rv', ab); |
---|
34 | GiW = struct('class','egiw',... |
---|
35 | 'V',4*[5 2; 2 1],... |
---|
36 | 'nu', 4,... |
---|
37 | 'dimx', 1,... |
---|
38 | 'rv', ab); |
---|
39 | Gb_a=struct('class','mgamma', 'beta',2, 'k',1, 'rv',b, 'rvc',a); % f(b|a) |
---|
40 | Ga_ =struct('class','mepdf','epdf',Ga); % convert f(a) to f(a|) |
---|
41 | Gba = struct('class','mprod', 'mpdfs',{{Gb_a,Ga_}}); |
---|
42 | |
---|
43 | pd.Ga=Ga; |
---|
44 | pd.N1a=N1a; |
---|
45 | pd.N1b=N1b; |
---|
46 | pd.N2a=N2a; |
---|
47 | pd.Nab=Nab; |
---|
48 | pd.GiW=GiW; |
---|
49 | pd.Gba=Gba; |
---|
50 | |
---|