Changeset 971 for applications
- Timestamp:
- 05/23/10 11:40:14 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/bdmtoolbox/sandbox/mpf_arx_3.m
r811 r971 1 clear all; 1 2 x = RV('x',2); 2 3 y = RV('y',2); … … 6 7 g.dimc = 2; 7 8 g.function = 'test_function'; 9 10 g.class = 'linfn'; 11 g.A = eye(2); 12 g.B = [1;0]; 8 13 9 14 h.class = 'linfn'; … … 33 38 %%%%% Estimator 34 39 A.class = 'ARX'; 35 A. rv = y;40 A.yrv = RV('vw',4); 36 41 A.rgr = RV({}); 37 A.rv_param = RV('R',4); 38 A.dimx=2; 42 A.dimx=4; 39 43 A.constant = 0; 40 44 A.frg=0.99; 41 45 42 A2=A; 43 A2.rv_param = RV('Q',4); 44 A2.rv=x; 46 M.class = 'NoiseParticle'; 47 M.g = g; 48 M.h = h; 49 M.rvx = x; 50 M.rvxc = RVtimes(x,-1); 51 M.rvyc = x; 52 M.bm = A; 45 53 46 E.class = 'MPF_ARXg'; 47 E.g = g; 48 E.h = h; 49 E.rvc = x; 50 E.arxo = A; 51 E.arxp = A2; 52 E.prior.class = 'enorm<ldmat>'; 53 E.prior.mu = [0.2;0.3]; 54 E.prior.R = 0.1*eye(2); 55 E.n = 100; 56 E.res_threshold = 1.0; 54 PF.class='PF'; 55 PF.particle = M; 56 PF.n = 100; 57 PF.res_threshold = 1.0; 58 PF.prior.class = 'enorm<ldmat>'; 59 PF.prior.mu = [0.2;0.3]; 60 PF.prior.R = 0.1*eye(2); 57 61 58 62 59 63 exper.ndat = 2000; 60 M = estimator(DS,{E},exper);64 O = estimator(DS,{PF},exper); 61 65 %%%%%% ARX estimator conditioned on frg 62 66