Page 1 of 1

How we can only translate .Mod to .Mat file without running?

PostPosted: Sun Jul 19, 2015 1:49 pm
by jack2015
Hi.

How we can only translate .Mod to .Mat file without running? For example MyTest.Mod to MyTest.Mat - same structure that Dynate do it automatically.

Thanks.

Re: How we can only translate .Mod to .Mat file without runn

PostPosted: Sun Jul 19, 2015 3:24 pm
by jpfeifer
What do you mean? In principle, when you run Dynare successfully on a mod-file, Dynare will save a _results.mat-file with all structures you will generally need.

Re: How we can only translate .Mod to .Mat file without runn

PostPosted: Sun Jul 19, 2015 3:32 pm
by jack2015
that's true but suppose that i only want m-file. I only want translate mod file to m-file without any other process. Run a code and generate a m-file based on mod file.

Re: How we can only translate .Mod to .Mat file without runn

PostPosted: Tue Jul 21, 2015 8:14 am
by jpfeifer
After running Dynare once, an m-file with the same name as the mod-file will be created. This is all you need to run.

Re: How we can only translate .Mod to .Mat file without runn

PostPosted: Tue Jul 21, 2015 8:27 am
by jack2015
thank you for answer. That's true but i only need the translated file without running it. I don't want the whole process of simulation, estimation and output generating. Only translation is sufficient.

Re: How we can only translate .Mod to .Mat file without runn

PostPosted: Tue Jul 21, 2015 8:57 am
by jpfeifer
I don't understand what you exactly want. Please try to describe your objective in full coherent English sentences.

Re: How we can only translate .Mod to .Mat file without runn

PostPosted: Wed Jul 22, 2015 10:57 am
by jack2015
When we run a .mod file, first, dynare translate .mod file to m-file. after automatically run m-file (main process of dynare- initialization, simulation, estimation etc.) and finally show outputs based on the m-file functions. I only want translated file. I don't want dynare automatically run m-file for main process. Suppose that we have a mod file. After running this mode file I only need a translated m-file beside it. Without any running, processing etc. Only a translator structure not more. I only want this part of total process of dynare.

Re: How we can only translate .Mod to .Mat file without runn

PostPosted: Wed Jul 22, 2015 11:11 am
by jpfeifer
Ok. Please see the manual on the command line option
Code: Select all
onlymacro

Re: How we can only translate .Mod to .Mat file without runn

PostPosted: Wed Jul 22, 2015 4:45 pm
by jack2015
Thank you for answer but 'onlymacro' command didn't create any m-file. I need translated m-file.

Re: How we can only translate .Mod to .Mat file without runn

PostPosted: Thu Jul 23, 2015 7:12 am
by jpfeifer
Sorry, my mistake. I think this is only possible by hacking the dynare.m file currently. If you comment out the last line
Code: Select all
evalin('base',fname) ;

it will not run the m-file. However, you have to undo this when you want to use Dynare regularly.

Re: How we can only translate .Mod to .Mat file without runn

PostPosted: Thu Jul 23, 2015 9:10 am
by jack2015
Thank you so much for your helps.