root/applications/bdmtoolbox/tutorial/userguide/arx_basic_example.m @ 1126

Revision 979, 0.8 kB (checked in by smidl, 14 years ago)

estimator returns the array of posterior estimators as second argument

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