fixes the correction of the Jacobian when encountering complex
numbers. This should be 2*imag(g1) and not imag(g1).^2issue#70
parent
2fbd5d33c6
commit
7093a54f3a
|
@ -1239,7 +1239,7 @@ StaticModel::writeStaticModel(ostream &StaticOutput, bool use_dll) const
|
|||
<< " %" << endl << endl
|
||||
<< jacobian_output.str()
|
||||
<< " if ~isreal(g1)" << endl
|
||||
<< " g1 = real(g1)+imag(g1).^2;" << endl
|
||||
<< " g1 = real(g1)+2*imag(g1);" << endl
|
||||
<< " end" << endl
|
||||
<< "end" << endl
|
||||
<< "if nargout >= 3," << endl
|
||||
|
|
Loading…
Reference in New Issue