Home > . > GetAllPosteriorDraws.m

GetAllPosteriorDraws

PURPOSE ^

stephane.adjemian@ens.fr [09-09-2005]

SYNOPSIS ^

function Draws = GetAllPosteriorDraws(column,FirstMhFile,FirstLine,TotalNumberOfMhFile,NumberOfDraws)

DESCRIPTION ^

 stephane.adjemian@ens.fr [09-09-2005]

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function Draws = GetAllPosteriorDraws(column,FirstMhFile,FirstLine,TotalNumberOfMhFile,NumberOfDraws)
0002 % stephane.adjemian@ens.fr [09-09-2005]
0003 global M_ options_
0004 
0005 nblck = options_.mh_nblck; 
0006 iline = FirstLine; 
0007 linee = 1;
0008 DirectoryName = CheckPath('metropolis');
0009 Draws = zeros(NumberOfDraws*nblck,1);
0010 logpo = zeros(NumberOfDraws*nblck,1);
0011 ipost=0;
0012 if column<0, 
0013   column=1;  
0014   ipost=1;
0015 end
0016 
0017 for file = FirstMhFile:TotalNumberOfMhFile
0018   for blck = 1:nblck
0019     load([DirectoryName '/'  M_.fname '_mh' int2str(file) '_blck' int2str(blck)],'x2','logpo2')
0020     NumberOfLines = size(x2(iline:end,:),1);
0021     Draws(linee:linee+NumberOfLines-1) = x2(iline:end,column);
0022     logpo(linee:linee+NumberOfLines-1) = logpo2(iline:end);
0023     linee = linee+NumberOfLines;
0024   end
0025   iline = 1;
0026 end
0027 
0028 if ipost,
0029   Draws=logpo;
0030 end

Generated on Fri 16-Jun-2006 09:09:06 by m2html © 2003