<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169147</link>
    <title>MATLAB Central Newsreader - problem saving matlab workspace</title>
    <description>Feed for thread: problem saving matlab workspace</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2008 by The MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>The MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Tue, 13 May 2008 04:56:03 -0400</pubDate>
      <title>problem saving matlab workspace</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169147#431706</link>
      <author>Anup </author>
      <description>I'm using matlab7.0.&lt;br&gt;
The code tries to learn a particular game.&lt;br&gt;
So the game is played several thousand times.&lt;br&gt;
So it would take hours/days to complete the simulation.&lt;br&gt;
Becuase of the regular power cuts i usually resort to &lt;br&gt;
saving the work space at the end of each game using &lt;br&gt;
save('filename').&lt;br&gt;
&lt;br&gt;
Intilaly i did not face any problems with this.even though &lt;br&gt;
the number of games played were as large as 10,000. But &lt;br&gt;
ocassionally i had an error saying that unable to save in &lt;br&gt;
the specified file. But it used to work if i either &lt;br&gt;
restarted the game or changed the filename.&lt;br&gt;
&lt;br&gt;
But now the error is now more persistent. Almost every &lt;br&gt;
time the same error pops up and this usally happens around &lt;br&gt;
the 1200th game or 3000th game.Can someone help me out &lt;br&gt;
with this problem.&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Tue, 13 May 2008 05:20:19 -0400</pubDate>
      <title>Re: problem saving matlab workspace</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/169147#431711</link>
      <author>helper </author>
      <description>"Anup " &amp;lt;anupekbote@gmail.com&amp;gt; wrote in message &amp;lt;g0b713&lt;br&gt;
$5fp$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I'm using matlab7.0.&lt;br&gt;
&amp;gt; The code tries to learn a particular game.&lt;br&gt;
&amp;gt; So the game is played several thousand times.&lt;br&gt;
&amp;gt; So it would take hours/days to complete the simulation.&lt;br&gt;
&amp;gt; Becuase of the regular power cuts i usually resort to &lt;br&gt;
&amp;gt; saving the work space at the end of each game using &lt;br&gt;
&amp;gt; save('filename').&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Intilaly i did not face any problems with this.even &lt;br&gt;
though &lt;br&gt;
&amp;gt; the number of games played were as large as 10,000. But &lt;br&gt;
&amp;gt; ocassionally i had an error saying that unable to save in &lt;br&gt;
&amp;gt; the specified file. But it used to work if i either &lt;br&gt;
&amp;gt; restarted the game or changed the filename.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; But now the error is now more persistent. Almost every &lt;br&gt;
&amp;gt; time the same error pops up and this usally happens &lt;br&gt;
around &lt;br&gt;
&amp;gt; the 1200th game or 3000th game.Can someone help me out &lt;br&gt;
&amp;gt; with this problem.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
I'm not sure what is causing your error, however you could &lt;br&gt;
try wrapping the SAVE command in a try/catch and repeating &lt;br&gt;
until the save is successful.&lt;br&gt;
&lt;br&gt;
errorOccurred = true;&lt;br&gt;
while errorOccurred&lt;br&gt;
&amp;nbsp;&amp;nbsp;try&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;errorOccurred = false;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;save(...)&lt;br&gt;
&amp;nbsp;&amp;nbsp;catch&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;errorOccurred = true;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;% Maybe put a pause or drawnow&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;% or even changing the filename here&lt;br&gt;
&amp;nbsp;&amp;nbsp;end&lt;br&gt;
end&lt;br&gt;
&lt;br&gt;
Also, within the CATCH, you might want to verify (using the &lt;br&gt;
LASTERROR command) that the error that occurred is actually &lt;br&gt;
the one you want to ignore.&lt;br&gt;
&lt;br&gt;
</description>
    </item>
  </channel>
</rss>
