Running mod file in different directory

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:
Non of these works, is this even possible?
Thanks!
- Code: Select all
dynare('MYDIR/myfile.mod')
dynare(strcat(pwd,'/MYDIR/myfile.mod'))
Non of these works, is this even possible?
Thanks!