From 771a12c8ae6c1696c822f383b1417dfe0922f7d1 Mon Sep 17 00:00:00 2001 From: stepan Date: Fri, 12 Jun 2009 09:40:32 +0000 Subject: [PATCH] Bug fix (introduced in the previous commit). git-svn-id: https://www.dynare.org/svn/dynare/trunk@2767 ac1d8469-bf42-47a9-8791-bf33cf982152 --- matlab/set_prior.m | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/matlab/set_prior.m b/matlab/set_prior.m index 6eebce65e..5657090a2 100644 --- a/matlab/set_prior.m +++ b/matlab/set_prior.m @@ -228,27 +228,27 @@ function [xparam1, estim_params_, bayestopt_, lb, ub, M_]=set_prior(estim_params % I save the prior definition if the prior has changed. if exist([ M_.dname '/prior/definition.mat']) - bayestopt_old = load([M_.dname '/prior/definition.mat'],'bayestopt_'); + old = load([M_.dname '/prior/definition.mat'],'bayestopt_'); prior_has_changed = 0; - if any(bayestopt_.p1-bayestopt_old.p1) + if any(bayestopt_.p1-old.bayestopt_.p1) prior_has_changed = 1; end - if any(bayestopt_.p2-bayestopt_old.p2) + if any(bayestopt_.p2-old.bayestopt_.p2) prior_has_changed = 1; end - if any(bayestopt_.p3-bayestopt_old.p3) + if any(bayestopt_.p3-old.bayestopt_.p3) prior_has_changed = 1; end - if any(bayestopt_.p4-bayestopt_old.p4) + if any(bayestopt_.p4-old.bayestopt_.p4) prior_has_changed = 1; end - if any(bayestopt_.p5-bayestopt_old.p5) + if any(bayestopt_.p5-old.bayestopt_.p5) prior_has_changed = 1; end - if any(bayestopt_.p6-bayestopt_old.p6) + if any(bayestopt_.p6-old.bayestopt_.p6) prior_has_changed = 1; end - if any(bayestopt_.p7-bayestopt_old.p7) + if any(bayestopt_.p7-old.bayestopt_.p7) prior_has_changed = 1; end if prior_has_changed