Changeset 933 for applications
- Timestamp:
- 05/11/10 16:25:24 (15 years ago)
- Location:
- applications/bdmtoolbox
- Files:
-
- 9 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/bdmtoolbox/mex/my_isobj.cpp
r925 r933 3 3 4 4 void mexFunction ( int n_output, mxArray *output[], int n_input, const mxArray *input[] ) { 5 printf("%d",mxIsObject(input[0])); 5 mxArray * m=(mxArray *)input[0]; 6 printf("%d",mxIsObject(m)); 7 mexCallMATLAB(0,0,1, &m, "validate"); 8 6 9 } 7 10 #endif -
applications/bdmtoolbox/tutorial/estimation/my_pdf.m
r926 r933 8 8 end 9 9 function validate(p) 10 if size( mu,2)>110 if size(p.mu,2)>1 11 11 error('mu must be scalar'); 12 12 end -
applications/bdmtoolbox/tutorial/userguide/arx_basic_example.m
r871 r933 17 17 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 18 18 % plot results 19 ndat = size(M.DS_ u,1);19 ndat = size(M.DS_dt_u,1); 20 20 21 21 subplot(1,2,1); … … 23 23 plotestimates(true_theta, ... 24 24 M.Est0_apost_mean_theta, ... 25 M.Est0_apost_lb _theta, ...26 M.Est0_apost_ub _theta);25 M.Est0_apost_lbound_theta, ... 26 M.Est0_apost_ubound_theta); 27 27 set(gca,'YLim',[-1.5,1]); 28 28 … … 31 31 plotestimates(true_R, ... 32 32 M.Est0_apost_mean_r, ... 33 M.Est0_apost_lb _r, ...34 M.Est0_apost_ub _r);33 M.Est0_apost_lbound_r, ... 34 M.Est0_apost_ubound_r); 35 35 36 36 title('Variance parameters r') -
applications/bdmtoolbox/tutorial/userguide/arx_ctrl_example.m
r871 r933 36 36 figure; 37 37 subplot(2,1,1); 38 plot(M.DS_ y);38 plot(M.DS_dt_y); 39 39 subplot(2,1,2); 40 40 hold off 41 plot(M.DS_ u1);41 plot(M.DS_dt_u1); 42 42 hold on 43 plot(M.DS_ u2);43 plot(M.DS_dt_u2); -
applications/bdmtoolbox/tutorial/userguide/arx_selection_example.m
r871 r933 30 30 31 31 %%%% Process results 32 lls = [sum(M.A1_ ll_) sum(M.A2_ll_) sum(M.A3_ll_)]32 lls = [sum(M.A1_evidence_) sum(M.A2_evidence_) sum(M.A3_evidence_)] 33 33 34 34 ells=exp(lls-max(lls)); -
applications/bdmtoolbox/tutorial/userguide/arx_windsurfer_example.m
r871 r933 34 34 losses_wind =zeros(1,N); 35 35 36 for i=1:10 0036 for i=1:10 37 37 M= controlloop(DS,{C1}); 38 losses_plain(i) = (M.DS_ y - C1.yreq)'*(M.DS_y - C1.yreq);38 losses_plain(i) = (M.DS_dt_y - C1.yreq)'*(M.DS_dt_y - C1.yreq); 39 39 40 40 M= controlloop(DS,{C2}); 41 losses_wind(i) = (M.DS_ y - C1.yreq)'*(M.DS_y - C1.yreq);41 losses_wind(i) = (M.DS_dt_y - C1.yreq)'*(M.DS_dt_y - C1.yreq); 42 42 if losses_wind(i)>100 43 43 % keyboard; -
applications/bdmtoolbox/tutorial/userguide/dist_estim_example.m
r871 r933 27 27 A1.rv = y; 28 28 A1.rgr = RVtimes([y,u1],[-3,0]) ; % correct structure is {y,y} 29 A1. options='logbounds,logevidence';29 A1.log_level ='logbounds,logevidence'; 30 30 A1.frg = 0.95; 31 31 A1.constant = 0; … … 38 38 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 39 39 % plot results 40 ndat = size(M.DS_ u1,1);40 ndat = size(M.DS_dt_u1,1); 41 41 42 42 true_theta1 = fy.A([1,2]); … … 46 46 figure(1); 47 47 subplot(2,1,1); 48 plot(M.DS_ y);48 plot(M.DS_dt_y); 49 49 title('Output'); 50 50 51 51 subplot(2,1,2); 52 plot(M.DS_ u1);52 plot(M.DS_dt_u1); 53 53 hold on 54 plot(M.DS_ u2);54 plot(M.DS_dt_u2); 55 55 title('Input'); 56 56 … … 62 62 plotestimates(true_theta1, ... 63 63 M.Est0_apost_mean_theta, ... 64 M.Est0_apost_lb _theta, ...65 M.Est0_apost_ub _theta);64 M.Est0_apost_lbound_theta, ... 65 M.Est0_apost_ubound_theta); 66 66 set(gca,'YLim',[-1.5,1]); 67 67 … … 70 70 plotestimates(true_R, ... 71 71 M.Est0_apost_mean_r, ... 72 M.Est0_apost_lb _r, ...73 M.Est0_apost_ub _r);72 M.Est0_apost_lbound_r, ... 73 M.Est0_apost_ubound_r); 74 74 75 75 title('Variance parameters r') … … 79 79 plotestimates(true_theta2, ... 80 80 M.Est1_apost_mean_theta, ... 81 M.Est1_apost_lb _theta, ...82 M.Est1_apost_ub _theta);81 M.Est1_apost_lbound_theta, ... 82 M.Est1_apost_ubound_theta); 83 83 set(gca,'YLim',[-1.5,1]); 84 84 … … 87 87 plotestimates(true_R, ... 88 88 M.Est1_apost_mean_r, ... 89 M.Est1_apost_lb _r, ...90 M.Est1_apost_ub _r);89 M.Est1_apost_lbound_r, ... 90 M.Est1_apost_ubound_r); 91 91 92 92 title('Variance parameters r') -
applications/bdmtoolbox/tutorial/userguide/epdfds_example.m
r706 r933 12 12 M=simulator(DS,experiment); 13 13 14 M.DS_ a14 M.DS_dt_a -
applications/bdmtoolbox/tutorial/userguide/particle_ARX.m
r888 r933 41 41 PF.particle.parameter_pdf = fx; 42 42 PF.particle.observation_pdf = fy; 43 PF.log_level = {'bounds','likelihood,'};43 PF.log_level ='logbounds,logevidence'; 44 44 PF.prior.class = 'egauss'; 45 45 PF.prior.mu = 0; … … 54 54 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 55 55 % plot results 56 ndat = size(M.DS_ u,1);56 ndat = size(M.DS_dt_u,1); 57 57 58 plotestimates(M.DS_ x, ...58 plotestimates(M.DS_dt_x, ... 59 59 M.Est0_apost_mean_x, ... 60 M.Est0_apost_lb _x, ...61 M.Est0_apost_ub _x);60 M.Est0_apost_lbound_x, ... 61 M.Est0_apost_ubound_x); 62 62 set(gca,'YLim',[-1.5,1]); 63 63