root/applications/bdmtoolbox/tutorial/userguide/pdfds_example.m @ 795

Revision 745, 0.7 kB (checked in by smidl, 15 years ago)

examples on windows

  • Property svn:eol-style set to native
Line 
1% name random variables
2y = RV({'y'},1);
3u = RV({'u'},1);
4
5% create f(y_t| y_{t-3}, u_{t-1})
6fy.class = 'mlnorm<ldmat>';
7fy.rv    = y;
8fy.rvc   = RVtimes([y,u], [-3, -1]);
9fy.A     = [0.5, -0.9];
10fy.const = 0;
11fy.R     = 1e-2;
12
13% create f(u_t| )
14fu.class = 'enorm<ldmat>';
15fu.rv    = u;
16fu.mu    = 0;
17fu.R     = 1e-1;
18
19% create DS
20DS.class = 'PdfDS';
21DS.pdf.class  = 'mprod';
22DS.pdf.pdfs  = {fy, fu};
23DS.init_rv = RVtimes([y,y,y], [-1,-2,-3]);
24DS.init_values = [0.1, 0.2, 0.3];
25
26experiment.ndat=100;
27
28%M=estimator(DS,{},experiment);
29M=estimator(DS,{},experiment);
30
31%%% store results
32Data=[M.DS_y'; M.DS_u'];
33drv = RVjoin([y,u]);
34true_theta=[fy.A fy.const];
35true_R=[fy.R];
36save pdfds_results Data drv y u true_theta true_R
Note: See TracBrowser for help on using the browser.