small fix to implementation of second derivatives of jacobian w.r.t. parameters

time-shift
Houtan Bastani 2010-03-15 16:02:07 +01:00
parent 19c4f7426c
commit b291f4fcf7
1 changed files with 2 additions and 1 deletions

View File

@ -2707,6 +2707,7 @@ DynamicModel::writeParamsDerivativesFile(const string &basename) const
{
if (!residuals_params_derivatives.size()
&& !jacobian_params_derivatives.size()
&& !jacobian_params_second_derivatives.size()
&& !hessian_params_derivatives.size())
return;
@ -2719,7 +2720,7 @@ DynamicModel::writeParamsDerivativesFile(const string &basename) const
cerr << "ERROR: Can't open file " << filename << " for writing" << endl;
exit(EXIT_FAILURE);
}
paramsDerivsFile << "function [rp, gp] = " << basename << "_params_derivs(y, x, params, it_)" << endl
paramsDerivsFile << "function [rp, gp, gpp, hp] = " << basename << "_params_derivs(y, x, params, it_)" << endl
<< "%" << endl
<< "% Warning : this file is generated automatically by Dynare" << endl
<< "% from model file (.mod)" << endl << endl;