<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241609</link>
    <title>MATLAB Central Newsreader - How to free an array  in the function</title>
    <description>Feed for thread: How to free an array  in the function</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by 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>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Sat, 27 Dec 2008 02:23:02 -0500</pubDate>
      <title>How to free an array  in the function</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241609#618917</link>
      <author>zedong </author>
      <description>for example:&lt;br&gt;
function f()&lt;br&gt;
a=ones(1000,10000);&lt;br&gt;
.......%This is some code with respect to a.Now a is no longer need.Now I want to free a    %and  do some other things,What should I do?&lt;br&gt;
b=zeros(1000,5000);%I must free a.&lt;br&gt;
end% the end of the function</description>
    </item>
    <item>
      <pubDate>Sat, 27 Dec 2008 02:55:03 -0500</pubDate>
      <title>Re: How to free an array  in the function</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241609#618918</link>
      <author>James Tursa</author>
      <description>&quot;zedong &lt;br&gt;
&quot; &amp;lt;zdongwu@gmail.com&amp;gt; wrote in message &amp;lt;gj43i6$l2n$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; for example:&lt;br&gt;
&amp;gt; function f()&lt;br&gt;
&amp;gt; a=ones(1000,10000);&lt;br&gt;
&amp;gt; .......%This is some code with respect to a.Now a is no longer need.Now I want to free a    %and  do some other things,What should I do?&lt;br&gt;
&amp;gt; b=zeros(1000,5000);%I must free a.&lt;br&gt;
&amp;gt; end% the end of the function&lt;br&gt;
&lt;br&gt;
clear a</description>
    </item>
    <item>
      <pubDate>Mon, 29 Dec 2008 14:45:11 -0500</pubDate>
      <title>Re: How to free an array  in the function</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241609#619134</link>
      <author>Loren Shure</author>
      <description>In article &amp;lt;gj45e7$djo$1@fred.mathworks.com&amp;gt;, &lt;br&gt;
aclassyguywithaknotac@hotmail.com says...&lt;br&gt;
&amp;gt; &quot;zedong &lt;br&gt;
&amp;gt; &quot; &amp;lt;zdongwu@gmail.com&amp;gt; wrote in message &amp;lt;gj43i6$l2n$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; for example:&lt;br&gt;
&amp;gt; &amp;gt; function f()&lt;br&gt;
&amp;gt; &amp;gt; a=ones(1000,10000);&lt;br&gt;
&amp;gt; &amp;gt; .......%This is some code with respect to a.Now a is no longer need.Now I want to free a    %and  do some other things,What should I do?&lt;br&gt;
&amp;gt; &amp;gt; b=zeros(1000,5000);%I must free a.&lt;br&gt;
&amp;gt; &amp;gt; end% the end of the function&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; clear a&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
or set the variable to empty:&lt;br&gt;
a = [];&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Loren&lt;br&gt;
&lt;a href=&quot;http://blogs.mathworks.com/loren&quot;&gt;http://blogs.mathworks.com/loren&lt;/a&gt;</description>
    </item>
  </channel>
</rss>

