Running codes in Dynare/Matlab

Please could you help me, i only can run codes like:

code1.pdf (250.5 KB)
But i can’t run this other:

code2.pdf (338.7 KB)
Most of the tutorials deal with the second and don’t understand the issue…
Best regards.

I’m not quite sure I understand. But for what I can see, the code in “code1” is a MATLAB routine that seems to have been written by Dynare. And “code2” is a Dynare file. The reason you cannot run “code2” is because you have to call it from the function dynare in MATLAB, Dynare files have .mod (also I think some use .dyn) extension and MATLAB files have .m.

e.g. suppose you have the code in “code2” in a file called code2.mod, for running it you have to type in the MATLAB console:

dynare code2

And of course have Dynare installed.

1 Like

Thanks.