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

Revision 934, 0.7 kB (checked in by smidl, 14 years ago)

use clear all + new mex

  • 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.rv = y;
13A1.rgr = RVtimes([y,u],[-3,-1]) ; % correct structure is {y,y}
14A1.log_level = 'logbounds,logevidence';
15
16M=estimator(DS,{A1});
17
18%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19% plot results
20ndat = size(M.DS_dt_u,1);
21
22subplot(1,2,1);
23hold off
24plotestimates(true_theta, ...
25    M.Est0_apost_mean_theta, ...
26    M.Est0_apost_lbound_theta, ...
27    M.Est0_apost_ubound_theta);
28set(gca,'YLim',[-1.5,1]);
29
30subplot(1,2,2);
31hold off
32plotestimates(true_R, ...
33    M.Est0_apost_mean_r, ...
34    M.Est0_apost_lbound_r, ...
35    M.Est0_apost_ubound_r);
36
37title('Variance parameters r')
Note: See TracBrowser for help on using the browser.