Revision 944, 0.9 kB
(checked in by smidl, 14 years ago)
|
Doc + new examples
|
-
Property svn:eol-style set to
native
|
Rev | Line | |
---|
[934] | 1 | clear all |
---|
[615] | 2 | % name random variables |
---|
[944] | 3 | x = RV({'x'},2); |
---|
[615] | 4 | |
---|
| 5 | |
---|
[944] | 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 |
---|
[615] | 14 | |
---|
[944] | 15 | |
---|
[615] | 16 | % create DS |
---|
[701] | 17 | DS.class = 'PdfDS'; |
---|
| 18 | DS.pdf.class = 'mprod'; |
---|
[944] | 19 | DS.pdf.pdfs = {fx, fu}; |
---|
| 20 | DS.init_rv = RVtimes([x], [-1]); |
---|
| 21 | DS.init_values = [0.1, 0.2]; |
---|
[615] | 22 | |
---|
| 23 | experiment.ndat=100; |
---|
| 24 | |
---|
[940] | 25 | M=simulator(DS,experiment); |
---|
[617] | 26 | %M=estimator(DS,{},experiment); |
---|
[630] | 27 | |
---|
| 28 | %%% store results |
---|
[934] | 29 | Data=[M.DS_dt_y'; M.DS_dt_u']; |
---|
[631] | 30 | drv = RVjoin([y,u]); |
---|
| 31 | true_theta=[fy.A fy.const]; |
---|
| 32 | true_R=[fy.R]; |
---|
[701] | 33 | save pdfds_results Data drv y u true_theta true_R |
---|