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

set_AtQA

PURPOSE ^

initialize AtQA{nl} to zero

SYNOPSIS ^

function [AtQA] = set_AtQA(Nvact, Ndelta, ax_z, mar, Vmar, nl_indx, NL_indx, sp_indx, AtQA0)

DESCRIPTION ^

 initialize AtQA{nl} to zero

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [AtQA] = set_AtQA ...
0002   (Nvact, Ndelta, ax_z, mar, Vmar, nl_indx, NL_indx, sp_indx, AtQA0)
0003 
0004 % initialize AtQA{nl} to zero
0005 AtQA = cell(Ndelta,1);
0006 for nl = 1:Ndelta
0007     AtQA{nl} = sp_init_value(AtQA0{nl},0);
0008 end
0009 
0010 for nl = 1:Ndelta
0011     for nv = 1:Nvact
0012         if ~isempty(nl_indx{nv,nl})
0013           marw = mar{nv}(nl_indx{nv,nl});
0014           VM = ( marw*marw' ...
0015              + Vmar{nv}(nl_indx{nv,nl},nl_indx{nv,nl}) )/ax_z(nv);
0016           
0017           % change values in AtQA{nl} directry
0018           sp_add_value(sp_indx{nv,nl}, VM(:), AtQA{nl});
0019 
0020 %          AtQAn = sparse(Nvact, Nvact);
0021 %          AtQAn(NL_indx{nv,nl},NL_indx{nv,nl}) =  VM;
0022 %          AtQA{nl} = AtQA{nl} + AtQAn;
0023         end
0024     end
0025 end

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