Dear experts,
i have already figure the way to loop parameter but still can't figure out the way to save the IRF results from the loop. Please suggest me some idea i don't know why the code didn't work
Here is my code
alphas = 0.4:0.1:0.6;
@#for i in 1:3
alpha = alphas(@{i});
stoch_simul(order=1, irf=20) y pih x pi r s e ;
if info;
disp(['Computation fails for alpha = ' num2str(alpha)]);
end;
dynasave savedresults@{i};
@#endfor;
Here is my error
Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
Starting Dynare (version 4.2.5).
Starting preprocessing of the model file ...
ERROR in macro-processor: PlainVanilla.mod:17.15-16: @#for loop not matched by an @#endfor (unexpected end of file)
Error using dynare (line 114)
DYNARE: preprocessing failed
one thing, can i do it with Matlab/octave like this
alphas = [ 0.4,0.6,0.8];
for i = 1:length(alphas)
alpha = alphas(i);
but how do i save the irf result from this sice i want to use matlab to further combine the irf graph
Million of thanks for your help,