set_dynare_seed

Hello everyone,
I am a bit puzzled by the function set_dynare_seed. In particular, it seems that if I have a model with more than one shock (say 2 shocks), the simulated shocks (in this case say with std=1) from dynare with set_dynare_seed('default') are different from the shocks generated by the lines:
rng('default')
randn(SimLength,M_.exo_nbr)
where the simulation lenght is the same.
When I have only one shock in the model, I don't find this difference.
Attached the sample code I'm using. Thanks a lot in advance for any comment
I am a bit puzzled by the function set_dynare_seed. In particular, it seems that if I have a model with more than one shock (say 2 shocks), the simulated shocks (in this case say with std=1) from dynare with set_dynare_seed('default') are different from the shocks generated by the lines:
rng('default')
randn(SimLength,M_.exo_nbr)
where the simulation lenght is the same.
When I have only one shock in the model, I don't find this difference.
Attached the sample code I'm using. Thanks a lot in advance for any comment