Commit 55399a5d authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Compatibility fix for Octave: under Octave, union() called on a column vector...

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 c71e0fbd
......@@ -12,7 +12,7 @@ function dynare_estimation_1(var_list_,dname)
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2003-2010 Dynare Team
% Copyright (C) 2003-2011 Dynare Team
%
% 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')];
end
% 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.
bayestopt_.restrict_var_list = k2;
% 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
% none
% Copyright (C) 2003-2007 Dynare Team
% Copyright (C) 2003-2011 Dynare Team
%
% 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')];
end
% 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
% in expanded state vector
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment