Home > vbmeg > functions > estimation > bayes > dynamics > mex-programs > cal_AtQA.m

cal_AtQA

PURPOSE ^

SYNOPSIS ^

function [AtQA] = cal_AtQA(Nvact, Ndelta, unidlt, ax_z, mar, Vmar, indx, deltax)

DESCRIPTION ^

 See imple_forward_pass_2nd.pdf for details.

 2015/02/06 M.Fukushima

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [AtQA] = cal_AtQA ...
0002   (Nvact, Ndelta, unidlt, ax_z, mar, Vmar, indx, deltax)
0003 %
0004 % See imple_forward_pass_2nd.pdf for details.
0005 %
0006 % 2015/02/06 M.Fukushima
0007 
0008 % Initialization
0009 AtQA = cell(Ndelta,1);
0010 for nl = 1:Ndelta
0011   AtQA{nl} = spalloc(Nvact, Nvact, Nvact);
0012 end
0013 mart = cell(Nvact,1);
0014 
0015 % Main
0016 for nv = 1:Nvact
0017   mart{nv} = mar{nv}';
0018   
0019   for nl = 1:Ndelta
0020     indnl = (deltax{nv}==unidlt(nl));
0021     
0022     if isempty(mar{nv}(indnl))==0
0023       mar_Vmar_nl = sparse(Nvact, Nvact);
0024       
0025       mar_Vmar_nl(indx{nv}(indnl),indx{nv}(indnl)) = ...
0026         mar{nv}(indnl)*mart{nv}(indnl) + Vmar{nv}(indnl,indnl);
0027       
0028       AtQA{nl} = AtQA{nl} + mar_Vmar_nl/ax_z(nv);
0029     end
0030   end
0031 end

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005