- Timestamp:
- 11/04/09 22:54:58 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/bdmtoolbox/tutorial/userguide/arx_basic_example.m
r631 r700 1 1 % load data created by the MpdfDS_example 2 load mpdfds_results2 load pdfds_results 3 3 4 4 DS.class = 'MemDS'; … … 17 17 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 18 18 % plot results 19 ndat = size(M. u,1);19 ndat = size(M.DS_u,1); 20 20 21 21 subplot(1,2,1); 22 22 hold off 23 plot((true_theta' *ones(1,ndat))','-.'); 24 title(' Regression parameters \theta') 25 hold on 26 plot(M.mean_theta(1:ndat,:)); 27 co = get(gca,'ColorOrder'); 28 for i=1:size(M.mean_theta,2) 29 ind =1:10:ndat; 30 h=errorbar(ind,M.mean_theta(ind,i),... 31 M.mean_theta(ind,i)-M.lb_theta(ind,i),M.mean_theta(ind,i)-M.ub_theta(ind,i),'.'); 32 set(h,'color',co(i,:)); 33 end 34 23 plotestimates(true_theta, ... 24 M.Est0_apost_mean_theta, ... 25 M.Est0_apost_lb_theta, ... 26 M.Est0_apost_ub_theta); 35 27 set(gca,'YLim',[-1.5,1]); 36 28 37 29 subplot(1,2,2); 38 30 hold off 39 plot(true_R*ones(1,ndat),'-.'); 31 plotestimates(true_R, ... 32 M.Est0_apost_mean_r, ... 33 M.Est0_apost_lb_r, ... 34 M.Est0_apost_ub_r); 35 40 36 title('Variance parameters r') 41 hold on42 plot(M.mean_r(1:ndat,:));43 co = get(gca,'ColorOrder');44 ind =1:10:ndat;45 for i=1:size(M.mean_r, 2)46 h=errorbar(ind,M.mean_r(ind,i),...47 M.mean_r(ind,i)-M.lb_r(ind,i),M.mean_r(ind,i)-M.ub_r(ind,i),'.');48 set(h,'color',co(i,:));49 end