Thanks for the link.

I have created the following m.file in matlab

[code]sig=0.1:0.01:0.7;

mu=zeros(length(sigma1),1);

alpha=0.36;

A=0.25;

k2=(1-alpha)/alpha;

r=(1-alpha)*A*(k2)^alpha;

tauk=0.01;

tauh=0.2;

tau=0.2;

sigma2=(0.25)^2;

for i=1:length(sig);

sigma1=sig(i);

save parameterfile alpha A k2 r tauk tauh tau sigma1 sigma2

dynare model_bb_taxk

result=oo_.steady_state;

mu(i)=result(17,1);

end; [/code]

and my mod. file modified to include this:

```
load parameterfile;
set_param_value('alpha', alpha);
set_param_value('A', A);
set_param_value('k2', k2);
set_param_value('r', r);
set_param_value('tauk', tauk);
set_param_value('tauh', tauh);
set_param_value('tau', tau);
set_param_value('sigma1', sigma1);
set_param_value('sigma2', sigma2);
```

But, matlab is returning the following errors:

[code]Undefined function ‘sig’ for input arguments of type ‘double’.

Error in loop_sigma1 (line 14)

sigma1=sig(i);[/code]

if I take out the “mu(i)=result(17,1);” part of the m.file code. And returns the following error, when I include the aforementioned part:

[code]Subscript indices must either be real positive integers or logicals.

Error in loop_sigma1 (line 18)

mu(i)=result(17,1);[/code]

But, once i take the dynare my.file command the m.file runs perfectly.

Can you please suggest what I should amend ? It seems to me that i am doing something that confuses matlab once I include the dynare withing the loop.