Show
Ignore:
Timestamp:
11/04/09 22:54:58 (15 years ago)
Author:
smidl
Message:

Making tutorial/userguide example work again (changes of mpdf and bayes)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • applications/bdmtoolbox/tutorial/userguide/arx_basic_example.m

    r631 r700  
    11% load data created by the MpdfDS_example 
    2 load mpdfds_results 
     2load pdfds_results 
    33 
    44DS.class   = 'MemDS'; 
     
    1717%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    1818% plot results 
    19 ndat = size(M.u,1); 
     19ndat = size(M.DS_u,1); 
    2020 
    2121subplot(1,2,1); 
    2222hold 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  
     23plotestimates(true_theta, ... 
     24    M.Est0_apost_mean_theta, ... 
     25    M.Est0_apost_lb_theta, ... 
     26    M.Est0_apost_ub_theta); 
    3527set(gca,'YLim',[-1.5,1]); 
    3628 
    3729subplot(1,2,2); 
    3830hold off 
    39 plot(true_R*ones(1,ndat),'-.'); 
     31plotestimates(true_R, ... 
     32    M.Est0_apost_mean_r, ... 
     33    M.Est0_apost_lb_r, ... 
     34    M.Est0_apost_ub_r); 
     35 
    4036title('Variance parameters r') 
    41 hold on 
    42 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