Page 1 of 1

I´m a new matlab and dynare user

PostPosted: Mon Jan 13, 2014 2:20 pm
by cagocu
Hello Friends,

I´m a new matlab and dynare user, I have beed reading some tutorial about that programs work but i can not undertand how i can manage the file, for example: if i have a model file, how i can open? I have to create a folder in the same directory where dynare is? please, if you have some document that helpme about manage a file, I would be very grateful.

Re: I´m a new matlab and dynare user

PostPosted: Mon Jan 13, 2014 3:37 pm
by Daniel Bendel
It is pretty simple:
1. Just create a folder, where you save your mod file, say model.mod
2. Then add the path where you save dynare to your workplace, just by typing (in fact you have to write YOUR path, where YOU have saved dynare): addpath c:\dynare\4.4.0\matlab
3. Open the model file, just by typing in the command window: dynare model.mod

Re: I´m a new matlab and dynare user

PostPosted: Mon Jan 13, 2014 4:17 pm
by jpfeifer
mod-files are simple text files. They can be opened with any editor. Typically, people open these files with the Matlab editor. The instruction above describes the procedure for Matlab.

Re: I´m a new matlab and dynare user

PostPosted: Tue Jan 14, 2014 12:35 am
by cagocu
Hello Friends

Thanks so much for your help. I have one questions, I have to create a folder to save model file in the same place where dynare is save? for example, the path where i save dyanare is C:\dynare y créate in dynare a folder like this C:\dynare\models?

Re: I´m a new matlab and dynare user

PostPosted: Tue Jan 14, 2014 8:40 am
by Daniel Bendel
No, you don't have to do this. Just save the folder where you want, but I think it is better not to save it where you saved dynare in order to keep things clean...

Re: I´m a new matlab and dynare user

PostPosted: Sat Jan 25, 2014 11:10 pm
by cagocu
Hello Friends,

I want to know if someone writes in the module where he has to declare the variables (in the file .mod) something like that:

var
c_t $c$ % % total consumption
ch_t $c^{h}$ % % domestic consumption

which means the front of the column before the comment? for example $c$. I know that the expresión after %% its a comment.

Re: I´m a new matlab and dynare user

PostPosted: Mon Jan 27, 2014 7:36 am
by jpfeifer
Yes, the code
Code: Select all
ch_t $c^{h}$ % % domestic consumption

does the following. The first entry defines the variable ch_t for use in Dynare. The second entry in the $ $-signs is a LaTeX declaration. It tells Dynare to use these LaTeX-Codes for the variable ch_t when using commands like
Code: Select all
write_latex_dynamic_model;

as documented in the manual. This second part is optional. If no LaTeX definition is present, Dynare will just use the Dynare variable name.
In your case, you could for example just use
Code: Select all
var
c_t % total consumption
ch_t % domestic consumption