para_rigid = 0.6:0.1:0.9;
for i=1:length(para_rigid)
    set_param_value('phi',para_rigid(i));
    save parameterfile phi;
    set_dynare_seed('default');
    %dynare model noclearall;
    dynare model_para noclearall;
    if info 
       fprintf('Here there is an error with this combination of paramters!\n');
    end
       para_pos=strmatch('ye',M_.endo_names,'exact');
       variance.para(i)=oo_.var(para_pos,para_pos);
       mean.para(i)=oo_.mean(para_pos);
end
    disp(['Results of loop for Dynare'])
    disp(['optimal param of variance.para(i) : ' num2str(variance.para)]);
    disp(['optimal param of mean.para(i) : ' num2str(mean.para)]);