|
Revision 934, 0.7 kB
(checked in by smidl, 15 years ago)
|
|
use clear all + new mex
|
-
Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 | % load data created by the MpdfDS_example |
|---|
| 2 | clear all |
|---|
| 3 | load pdfds_results |
|---|
| 4 | |
|---|
| 5 | DS.class = 'MemDS'; |
|---|
| 6 | DS.Data = Data; |
|---|
| 7 | DS.drv = drv; |
|---|
| 8 | |
|---|
| 9 | %%%%%% ARX estimator |
|---|
| 10 | |
|---|
| 11 | A1.class = 'ARX'; |
|---|
| 12 | A1.rv = y; |
|---|
| 13 | A1.rgr = RVtimes([y,u],[-3,-1]) ; % correct structure is {y,y} |
|---|
| 14 | A1.log_level = 'logbounds,logevidence'; |
|---|
| 15 | |
|---|
| 16 | M=estimator(DS,{A1}); |
|---|
| 17 | |
|---|
| 18 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 19 | % plot results |
|---|
| 20 | ndat = size(M.DS_dt_u,1); |
|---|
| 21 | |
|---|
| 22 | subplot(1,2,1); |
|---|
| 23 | hold off |
|---|
| 24 | plotestimates(true_theta, ... |
|---|
| 25 | M.Est0_apost_mean_theta, ... |
|---|
| 26 | M.Est0_apost_lbound_theta, ... |
|---|
| 27 | M.Est0_apost_ubound_theta); |
|---|
| 28 | set(gca,'YLim',[-1.5,1]); |
|---|
| 29 | |
|---|
| 30 | subplot(1,2,2); |
|---|
| 31 | hold off |
|---|
| 32 | plotestimates(true_R, ... |
|---|
| 33 | M.Est0_apost_mean_r, ... |
|---|
| 34 | M.Est0_apost_lbound_r, ... |
|---|
| 35 | M.Est0_apost_ubound_r); |
|---|
| 36 | |
|---|
| 37 | title('Variance parameters r') |
|---|