From 7c6ae272f66bebadffdf81e3761f7ecd65ba059c Mon Sep 17 00:00:00 2001 From: Houtan Bastani <houtan.bastani@ens.fr> Date: Tue, 25 Sep 2012 16:08:16 +0200 Subject: [PATCH] ms-sbvar: remove field removal for file tags --- matlab/ms-sbvar/initialize_ms_sbvar_options.m | 10 +++------- matlab/ms-sbvar/set_file_tags.m | 4 ++-- matlab/ms-sbvar/set_ms_simulation_file.m | 4 ++-- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/matlab/ms-sbvar/initialize_ms_sbvar_options.m b/matlab/ms-sbvar/initialize_ms_sbvar_options.m index 43ea36569..369cbfead 100644 --- a/matlab/ms-sbvar/initialize_ms_sbvar_options.m +++ b/matlab/ms-sbvar/initialize_ms_sbvar_options.m @@ -32,15 +32,11 @@ function options_=initialize_ms_sbvar_options(M_, options_) % MS SBVAR % all mex functions options_.ms.file_tag = M_.fname; -options_.ms.create_init = 1; options_.ms.mh_file = ''; options_.ms.free_param_file = ''; -if isfield(options_.ms,'simulation_file_tag') - options_.ms = rmfield(options_.ms,'simulation_file_tag'); -end -if isfield(options_.ms,'output_file_tag') - options_.ms = rmfield(options_.ms,'output_file_tag'); -end +options_.ms.output_file_tag = ''; +options_.ms.simulation_file_tag = ''; +options_.ms.create_init = 1; % prepare ms sbvar & estimation options_.ms.coefficients_prior_hyperparameters = [1.0 1.0 0.1 1.2 1.0 1.0]; options_.ms.freq = 4; diff --git a/matlab/ms-sbvar/set_file_tags.m b/matlab/ms-sbvar/set_file_tags.m index cacd91e69..6945f4ca2 100644 --- a/matlab/ms-sbvar/set_file_tags.m +++ b/matlab/ms-sbvar/set_file_tags.m @@ -11,7 +11,7 @@ function [options_]=set_file_tags(options_) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2011 Dynare Team +% Copyright (C) 2011-2012 Dynare Team % % This file is part of Dynare. % @@ -28,7 +28,7 @@ function [options_]=set_file_tags(options_) % You should have received a copy of the GNU General Public License % along with Dynare. If not, see <http://www.gnu.org/licenses/>. -if ~isfield(options_.ms,'output_file_tag') +if isempty(options_.ms.output_file_tag) options_.ms.output_file_tag = options_.ms.file_tag; end end diff --git a/matlab/ms-sbvar/set_ms_simulation_file.m b/matlab/ms-sbvar/set_ms_simulation_file.m index 75e815b47..b65427c42 100644 --- a/matlab/ms-sbvar/set_ms_simulation_file.m +++ b/matlab/ms-sbvar/set_ms_simulation_file.m @@ -11,7 +11,7 @@ function options_=set_ms_simulation_file(options_) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2011 Dynare Team +% Copyright (C) 2011-2012 Dynare Team % % This file is part of Dynare. % @@ -28,7 +28,7 @@ function options_=set_ms_simulation_file(options_) % You should have received a copy of the GNU General Public License % along with Dynare. If not, see <http://www.gnu.org/licenses/>. -if ~isfield(options_.ms, 'simulation_file_tag') +if isempty(options_.ms.simulation_file_tag) options_.ms.simulation_file_tag = options_.ms.file_tag; end options_.ms.mh_file = ['simulation_' options_.ms.simulation_file_tag '.out']; -- GitLab