Home > matlab > kalman > build_selection_matrix.m

build_selection_matrix

PURPOSE ^

Builds the selection matrix of the measurement equation from the vector

SYNOPSIS ^

function Z = build_selection_matrix(mf,m,p)

DESCRIPTION ^

 Builds the selection matrix of the measurement equation from the vector
 of indices mf.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function Z = build_selection_matrix(mf,m,p)
0002 % Builds the selection matrix of the measurement equation from the vector
0003 % of indices mf.
0004 
0005 % Copyright (C) 2004-2009 Dynare Team
0006 %
0007 % This file is part of Dynare.
0008 %
0009 % Dynare is free software: you can redistribute it and/or modify
0010 % it under the terms of the GNU General Public License as published by
0011 % the Free Software Foundation, either version 3 of the License, or
0012 % (at your option) any later version.
0013 %
0014 % Dynare is distributed in the hope that it will be useful,
0015 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0016 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0017 % GNU General Public License for more details.
0018 %
0019 % You should have received a copy of the GNU General Public License
0020 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
0021 Z = zeros(p,m);
0022 for i=1:p
0023     Z(i,mf(i)) = 1;
0024 end

Generated on Mon 21-May-2012 02:42:43 by m2html © 2005