root/applications/bdmtoolbox/tutorial/merging/pdfs.m @ 611

Revision 568, 1.0 kB (checked in by smidl, 15 years ago)

bdmtoolbox adapted to shared_ptr, merger_grid (partially) working,

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