Thanks Jonathan!<br><br>It works fine and its much faster!<br><br>Regards,<br><br><div class="gmail_quote">On Wed, Jun 15, 2011 at 12:10 PM, Jonathan Blanchard <span dir="ltr"><<a href="mailto:BlanchardJ@ieee.org">BlanchardJ@ieee.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div class="h5">On Wed, Jun 15, 2011 at 11:45 AM, Eduardo Torrecillas<br>
<<a href="mailto:eduardo.torrecillas@gmail.com">eduardo.torrecillas@gmail.com</a>> wrote:<br>
> Hi all,<br>
><br>
> I have a script basically using functions below, inside a loop:<br>
><br>
> fig=figure(countfig)<br>
> f=scf(fig)<br>
> plot2d(...)<br>
> x2eps(...)<br>
> close(fig)<br>
><br>
> Unfortunately, when the number of images is huge, I always get memory errors<br>
> (saying memory is empty) and the script is aborted.<br>
> Is there any way to clear memory after each plotting/saving to avoid this?<br>
><br>
> Regards,<br>
> --<br>
> Eduardo Torrecillas<br>
> AER-09<br>
><br>
<br>
</div></div>You may want to try clearing the current figure using clf() instead of<br>
creating a new one each time. I found that method better suited when<br>
generating a lot of figures and also somewhat faster.<br>
<font color="#888888"><br>
Jonathan Blanchard<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Eduardo Torrecillas<br>AER-09<br>