Import variance-covariance matrix

I was wondering if there is a smart way of assigning a large variance-covariance matrix to the ‘shocks’ block in dynare. I have multiple countries and I use the macro-language to loop over them. I also have the variance-covariance matrix saved as a matlab matrix. This matrix might change and also the number of countries might change. I was therefore looking for a flexible approach where I can just ask dynare to import the variance-covariance matrix:

Currently, my setup is as follows:

@#for i in countries
var sh_om@{i} = 0.05^2;
var sh_ZN@{i} = 0.01^2;

But I would like to use different variances for different countries and also populate the off-diagonal elements.
Thanks and let me know if you need more clarifications.

From what you describe, it might be easiest to directly modify M_.Sigma without specifying a shocks-block.

Great, thanks, Johannes.