Page 1 of 1

Running mod file in different directory

PostPosted: Wed Jan 22, 2014 8:04 pm
by pcb
Hi, this is a very simple question. How can I run the .mod file without having to change to the directory where I have my .mod file? Say I have a myfile.mod sitting on /MYDIR/. I have tried the following from Matlab's command line:

Code: Select all
dynare('MYDIR/myfile.mod')

dynare(strcat(pwd,'/MYDIR/myfile.mod'))


Non of these works, is this even possible?

Thanks!

Re: Running mod file in different directory

PostPosted: Thu Jan 23, 2014 7:43 am
by jpfeifer
That is simply not possible. Why do you want to stay in a different directory?

Re: Running mod file in different directory

PostPosted: Thu Jan 23, 2014 1:41 pm
by pcb
Thanks for the reply. I want to do this because I have a main script that calls an mod file and other functions and would like to keep all my Dynare related files in a different directory to avoid cluttering my main directory. For now the main script manually change the directory to where my mod file is to run Dynare and then go back to the main directory, but I was hoping for a simpler way to do it.

Thanks again!