Increase number of digits in output

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Increase number of digits in output

Postby Sophie » Thu Sep 01, 2016 4:04 pm

Dear all,

I have a very basic question: How can I increase the number of digits shown in the output given by Dynare?
Some of the output is very close to zero and I would like to see more than the four digits shown (for the theoretical moments).
I tried using the matlab-command "format long" before running the file but it did not work...

Thanks for your help
Sophie
 
Posts: 8
Joined: Wed Jul 20, 2016 1:56 pm

Re: Increase number of digits in output

Postby jpfeifer » Thu Sep 01, 2016 5:27 pm

That is somewhat tricky. For theoretical moments, you have to go to
Code: Select all
disp_th_moments.m

There you will find calls to dyntable like
Code: Select all
        dyntable(options_,title,headers,labels,z,lh,11,4);

First number at the end is the number of total digits displayed, the last number is the number of decimals. 4 in this case. You need to manually increase it.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Increase number of digits in output

Postby Sophie » Fri Sep 02, 2016 9:55 am

Thank you very much! It was successful.
Sophie
 
Posts: 8
Joined: Wed Jul 20, 2016 1:56 pm

Re: Increase number of digits in output

Postby jpfeifer » Wed Jun 21, 2017 8:14 pm

In
Code: Select all
disp_steady_state.m

the line
Code: Select all
disp(sprintf('%s \t\t %g',endo_names(i,:),steady_state(i)));

needs to be altered from
Code: Select all
%g

to e.g.
Code: Select all
%6g

for six digits
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 12 guests