# ? MJDGGES requires two square real matrices of the same

**URL:** <https://forum.dynare.org/t/mjdgges-requires-two-square-real-matrices-of-the-same/1057>\
**Category:** Dynare help (legacy posts)\
**Created:** [26 May 2009 14:10 UTC](https://forum.dynare.org/t/mjdgges-requires-two-square-real-matrices-of-the-same/1057 "2009-05-26T14:10:28Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![stepan-a](https://forum.dynare.org/user_avatar/forum.dynare.org/stepan-a/32/6652_2.png) [@stepan-a](https://forum.dynare.org/u/stepan-a)\
**Post date:** [26 May 2009 22:13 UTC](https://forum.dynare.org/t/mjdgges-requires-two-square-real-matrices-of-the-same/1057/4 "2009-05-26T22:13:40Z")

</div>

In dr1.m you should have (lines 209 to 217):

```auto
    if ~isreal(jacobia_)
        if max(max(abs(imag(jacobia_)))) < 1e-15
            jacobia_ = real(jacobia_);
        else
            info(1) = 6;
            info(2) = sum(sum(imag(jacobia_).^2));
            return
        end
    end
```

If the jacobian matrix is complex dr1 returns info(1)=6. Can you post (or send) your mod file if you do not fall in the trap ?

Stéphane.

---

_[View the full topic](https://forum.dynare.org/t/mjdgges-requires-two-square-real-matrices-of-the-same/1057)._
