# Small bug in pm3

**URL:** <https://forum.dynare.org/t/small-bug-in-pm3/938>\
**Category:** Dynare v4 (legacy)\
**Created:** [26 February 2009 05:21 UTC](https://forum.dynare.org/t/small-bug-in-pm3/938 "2009-02-26T05:21:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![JamieHall](https://forum.dynare.org/letter_avatar_proxy/v4/letter/j/3ec8ea/32.png) [@JamieHall](https://forum.dynare.org/u/JamieHall)\
**Post date:** [26 February 2009 05:21 UTC](https://forum.dynare.org/t/small-bug-in-pm3/938/1 "2009-02-26T05:21:12Z")

</div>

Hi everyone,

I think that the variable “j” should be “i” in lines 112 and 117 of pm3.m.

Otherwise, if you’re unlucky enough to have the same number of parameters as observations, you’ll get a new plot window for each variable when displaying Smoothed Variables or Filtered Variables, and each plot only appears in the top left corner of the window. This behaviour can crash Matlab if the number of parameters is large.

cheers  
Jamie

---

<div class="post-metadata">

**Author:** ![sebastien](https://forum.dynare.org/user_avatar/forum.dynare.org/sebastien/32/19973_2.png) [@sebastien](https://forum.dynare.org/u/sebastien)\
**Post date:** [26 February 2009 11:16 UTC](https://forum.dynare.org/t/small-bug-in-pm3/938/2 "2009-02-26T11:16:58Z")

</div>

Hi,

Thanks for reporting this. It has been fixed in the unstable branch of Dynare, and will be incorporated in the next stable release (4.0.3).

Sébastien

---

<div class="post-metadata">

**Author:** ![JamieHall](https://forum.dynare.org/letter_avatar_proxy/v4/letter/j/3ec8ea/32.png) [@JamieHall](https://forum.dynare.org/u/JamieHall)\
**Post date:** [1 March 2009 23:16 UTC](https://forum.dynare.org/t/small-bug-in-pm3/938/3 "2009-03-01T23:16:35Z")

</div>

Just noticed another bit that needs to be edited: line 142 should read:

```
if(~(i==nvar)) hh = figure('Name',[name3 ' ' int2str(figunumber+1)]); end;

```

Otherwise you get a blank plot window at the end of each set of plots.

cheers  
Jamie

---

<div class="post-metadata">

**Author:** ![sebastien](https://forum.dynare.org/user_avatar/forum.dynare.org/sebastien/32/19973_2.png) [@sebastien](https://forum.dynare.org/u/sebastien)\
**Post date:** [5 March 2009 11:01 UTC](https://forum.dynare.org/t/small-bug-in-pm3/938/4 "2009-03-05T11:01:01Z")

</div>

Thanks, this has been incorporated.

Sébastien

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [24 July 2017 13:28 UTC](https://forum.dynare.org/t/small-bug-in-pm3/938/5 "2017-07-24T13:28:54Z")

</div>



---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [24 July 2017 13:29 UTC](https://forum.dynare.org/t/small-bug-in-pm3/938/6 "2017-07-24T13:29:42Z")

</div>


