Error using log Too many input arguments

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.

Error using log Too many input arguments

Postby missredridinghood » Tue Nov 11, 2014 10:09 pm

Can someone please provide me direction?

I am getting the following error message when I code an RBC model with labor and investment adjustment costs.

Error using log
Too many input arguments.
Error in Ch1Modelv7 (line 174)
M_.NNZDerivatives(1) = 72;
Error in dynare (line 185)
evalin('base',fname) ;
missredridinghood
 
Posts: 19
Joined: Tue Nov 11, 2014 12:37 am

Re: Error using log Too many input arguments

Postby jpfeifer » Wed Nov 12, 2014 9:19 am

This is a very strange Matlab (not Dynare) bug. I will file a bug report with Matlab. The reason seems to be that in your initval-block you define
Code: Select all
n=log(0.7)

which is a negative number. Then in the next line you use
Code: Select all
  y = alpha*log(k)+(1-alpha)*log(n);

You take the log of n, which is negative and results in a complex number.
------------
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: Error using log Too many input arguments

Postby missredridinghood » Wed Nov 12, 2014 9:58 am

Thank you Johannes for the direction. It is very helpful.
missredridinghood
 
Posts: 19
Joined: Tue Nov 11, 2014 12:37 am

Re: Error using log Too many input arguments

Postby jpfeifer » Wed Nov 12, 2014 10:08 am

I got feedback from Mathworks. The error message about a wrong line is a bug associated with the Matlab accelerator (and is still present in 2014b). Putting
Code: Select all
feature accel off

resolves the problem and will provide correct output, but it will come at a performance cost. Mathworks will fix this in a future version.
------------
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: No registered users and 13 guests