From 912b22d0e9944b21b2c2d8f21dbc92740e02c346 Mon Sep 17 00:00:00 2001 From: Michel Juillard Date: Tue, 10 May 2011 10:45:25 +0200 Subject: [PATCH] correcting bug in forcing real values for complex elements of Jacobian in static model --- StaticModel.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/StaticModel.cc b/StaticModel.cc index 5d74d2d8..20a27194 100644 --- a/StaticModel.cc +++ b/StaticModel.cc @@ -1193,7 +1193,7 @@ StaticModel::writeStaticMFile(const string &func_name) const } output << " if ~isreal(g1)" << endl - << " g1 = real(g1)+2*imag(g1);" << endl + << " g1 = real(g1)+imag(g1).^2;" << endl << " end" << endl << "end" << endl << "if nargout >= 3," << endl