Incorporating matlab function into dynare
Posted: Wed Jul 30, 2014 10:59 pm
Hi
I'm trying to use matlab to solve for the steady state and then use those steady state values as initial value in the dynare file.
My model_steadystate.m is as exactly as follows:
syms x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13
h=solve(EQ1,EQ2...EQ13)
c1=h.x1(1)
c2=h.x2(1)
...
G=h.x13(1)
The corresponding part in my model.mod file is as follows:
model;
...
end;
model_steadstate.m; //the parameter values are passed from .mod to .m file from here I believe
initval;
c1=h.x1(1)
c2=h.x2(1)
...
G=h.x13(1)
end;
steady;
check;
However, I get "ERROR: model.mod: line 69, col 5: character unrecognized by lexer" (line 69 is the line c1=h.x1(1) in the dynare file) when I run the dynare file. How should I correct this? Is it because I'm not calling the .m file from the .mod file correctly?
Thanks
I'm trying to use matlab to solve for the steady state and then use those steady state values as initial value in the dynare file.
My model_steadystate.m is as exactly as follows:
syms x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13
h=solve(EQ1,EQ2...EQ13)
c1=h.x1(1)
c2=h.x2(1)
...
G=h.x13(1)
The corresponding part in my model.mod file is as follows:
model;
...
end;
model_steadstate.m; //the parameter values are passed from .mod to .m file from here I believe
initval;
c1=h.x1(1)
c2=h.x2(1)
...
G=h.x13(1)
end;
steady;
check;
However, I get "ERROR: model.mod: line 69, col 5: character unrecognized by lexer" (line 69 is the line c1=h.x1(1) in the dynare file) when I run the dynare file. How should I correct this? Is it because I'm not calling the .m file from the .mod file correctly?
Thanks