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

Revision 944, 0.9 kB (checked in by smidl, 14 years ago)

Doc + new examples

  • Property svn:eol-style set to native
Line 
1clear all
2% name random variables
3x = RV({'x'},2);
4
5
6fx.class  = 'mgnorm<ldmat>';             
7fx.rv     = x;             
8fx.rvc    = RVtimes(x,-1);             
9fx.g      = 'mexFunction';              % function is evaluated in matlab
10fx.g.function = 'test_function';         % name of the matlab function to evaluate
11fx.g.dim  = 2;                          % expected dimension of output
12fx.g.dimc = 2;                          % expected dimension of input
13fx.R      = eye(2);                     % variance R
14
15
16% create DS
17DS.class = 'PdfDS';
18DS.pdf.class  = 'mprod';
19DS.pdf.pdfs  = {fx, fu};
20DS.init_rv = RVtimes([x], [-1]);
21DS.init_values = [0.1, 0.2];
22
23experiment.ndat=100;
24
25M=simulator(DS,experiment);
26%M=estimator(DS,{},experiment);
27
28%%% store results
29Data=[M.DS_dt_y'; M.DS_dt_u'];
30drv = RVjoin([y,u]);
31true_theta=[fy.A fy.const];
32true_R=[fy.R];
33save pdfds_results Data drv y u true_theta true_R
Note: See TracBrowser for help on using the browser.