Loop over deterministic simulation with updating initial shock values

Hi there, I solve a simple New Keynesian model deterministically. I want to run the code several times but with different shock values. Is there a way to draw the shock value from a matrix and put this behind ‘values’ in the shock block? If so, I want to loop over the simulation and put in a new shock value in every simulation. Is this possible?

From an earlier question I read that one can skip the shock block and go with

perfect_foresight_setup(periods=…);
oo_.exo_simul = mymatrix;
perfect_foresight_solver;

But this draws the shocks for one simulation over time. Thanks a lot in advance!

You can just loop over the latter part, i.e.

for ii=1:10
mymatrix=...
oo_.exo_simul = mymatrix;
perfect_foresight_solver;
end