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