clear all;
close all;

addpath('C:/dynare/5.5/matlab'); 
sigma_a = 0.02; 

dynare estimated.mod;

M_.params(strmatch('sigma_a', M_.param_names, 'exact')) = sigma_a;

steady;


[info, oo_] = stoch_simul(M_, options_, oo_);

% test if simulation works
if info(1)
    error('Simulation failed with info code %d. Check model or parameters.', info(1));
else
    fprintf('Simulation completed with sigma_a = %.4f\n', sigma_a);
end

rmpath('C:/dynare/5.5/matlab'); 