v4.1: initialize_from_mode doesn't need bayestopt_ anymore

git-svn-id: https://www.dynare.org/svn/dynare/trunk@2560 ac1d8469-bf42-47a9-8791-bf33cf982152
time-shift
michel 2009-04-06 16:33:42 +00:00
parent adc1e77514
commit cff38c00cf
1 changed files with 3 additions and 4 deletions

View File

@ -32,7 +32,7 @@ function estim_params_ = initialize_from_mode(fname,M_,estim_params_)
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
load(fname);
load(fname,'xparam1','parameter_names');
endo_names = M_.endo_names;
exo_names = M_.exo_names;
@ -42,9 +42,8 @@ function estim_params_ = initialize_from_mode(fname,M_,estim_params_)
var_endo = estim_params_.var_endo;
corrx = estim_params_.corrx;
corrn = estim_params_.corrn;
names = bayestopt_.name;
for i=1:length(names)
name = names{i};
for i=1:length(parameter_names)
name = parameter_names{i};
k1 = strmatch(name,param_names,'exact');
if ~isempty(k1)
k2 = find(param_vals(:,1) == k1);