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

Revision 871, 0.7 kB (checked in by mido, 14 years ago)

adaptation of /applications to new version of LOG_LEVEL
also, a cosmetic change made in enumerations: logub -> logubound, loglb -> loglbound

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