Compatibility fix for Octave: under Octave, union() called on a column vector and a scalar returns a row vector, hence the need to add the 'rows' option
parent
c71e0fbd6b
commit
55399a5dc5
|
@ -12,7 +12,7 @@ function dynare_estimation_1(var_list_,dname)
|
||||||
% SPECIAL REQUIREMENTS
|
% SPECIAL REQUIREMENTS
|
||||||
% none
|
% none
|
||||||
|
|
||||||
% Copyright (C) 2003-2010 Dynare Team
|
% Copyright (C) 2003-2011 Dynare Team
|
||||||
%
|
%
|
||||||
% This file is part of Dynare.
|
% This file is part of Dynare.
|
||||||
%
|
%
|
||||||
|
@ -196,7 +196,7 @@ for i=1:n_varobs
|
||||||
k1 = [k1 strmatch(deblank(options_.varobs(i,:)),M_.endo_names, 'exact')];
|
k1 = [k1 strmatch(deblank(options_.varobs(i,:)),M_.endo_names, 'exact')];
|
||||||
end
|
end
|
||||||
% Define union of observed and state variables
|
% Define union of observed and state variables
|
||||||
k2 = union(var_obs_index',[dr.nstatic+1:dr.nstatic+dr.npred]');
|
k2 = union(var_obs_index',[dr.nstatic+1:dr.nstatic+dr.npred]', 'rows');
|
||||||
% Set restrict_state to postion of observed + state variables in expanded state vector.
|
% Set restrict_state to postion of observed + state variables in expanded state vector.
|
||||||
bayestopt_.restrict_var_list = k2;
|
bayestopt_.restrict_var_list = k2;
|
||||||
% set mf0 to positions of state variables in restricted state vector for likelihood computation.
|
% set mf0 to positions of state variables in restricted state vector for likelihood computation.
|
||||||
|
|
|
@ -14,7 +14,7 @@ function [data,rawdata]=dynare_estimation_init(var_list_, igsa)
|
||||||
% SPECIAL REQUIREMENTS
|
% SPECIAL REQUIREMENTS
|
||||||
% none
|
% none
|
||||||
|
|
||||||
% Copyright (C) 2003-2007 Dynare Team
|
% Copyright (C) 2003-2011 Dynare Team
|
||||||
%
|
%
|
||||||
% This file is part of Dynare.
|
% This file is part of Dynare.
|
||||||
%
|
%
|
||||||
|
@ -160,7 +160,7 @@ for i=1:n_varobs
|
||||||
k1 = [k1 strmatch(deblank(options_.varobs(i,:)),M_.endo_names, 'exact')];
|
k1 = [k1 strmatch(deblank(options_.varobs(i,:)),M_.endo_names, 'exact')];
|
||||||
end
|
end
|
||||||
% union of observed and state variables
|
% union of observed and state variables
|
||||||
k2 = union(k',[dr.nstatic+1:dr.nstatic+dr.npred]');
|
k2 = union(k',[dr.nstatic+1:dr.nstatic+dr.npred]', 'rows');
|
||||||
|
|
||||||
% set restrict_state to postion of observed + state variables
|
% set restrict_state to postion of observed + state variables
|
||||||
% in expanded state vector
|
% in expanded state vector
|
||||||
|
|
Loading…
Reference in New Issue