# Dynare Julia - Loop over parameters

**URL:** https://forum.dynare.org/t/dynare-julia-loop-over-parameters/22052
**Category:** Dynare Julia
**Created:** [8 March 2023 13:24 UTC](https://forum.dynare.org/t/dynare-julia-loop-over-parameters/22052 "2023-03-08T13:24:06Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)
#### Post date: [9 March 2023 15:43 UTC](https://forum.dynare.org/t/dynare-julia-loop-over-parameters/22052/8 "2023-03-09T15:43:30Z")

</div>

Looping over the function itself and reading out the `info`-code:

> [@Parameter loop in Dynare 5.x](https://forum.dynare.org/t/parameter-loop-in-dynare-5-x/20293/3):
>
> ```auto
> OMEGARS = 1:1:5;
> first_time = 1;
> 
> for i = 1:length(OMEGARS)
> if first_time           
> dynare rentalhousing noclearall;
> first_time = 0;
> else                 
> set_param_value('OMEGAR',OMEGARS(i));        
> [info, oo_] = stoch_simul(M_, options_, oo_, var_list_);
> if info
> disp(['Computation fails for rho = ' num2str(OMEGARS)]);
> else
> %results_cell{i} = oo_ ;
> plot(oo_.irfs.data_QQ_eps_j);
> hold on;
> disp('I am plotting');
> oo_.irfs.data_QQ_eps_j
> end
> end 
> 
> ```

Under Matlab, you can put the loop (ignoring the first time call) into a `verbatim`-block to simply do the loop.

---

_[View the full topic](https://forum.dynare.org/t/dynare-julia-loop-over-parameters/22052)._
