Path: news.mathworks.com!not-for-mail
From: Loren Shure <loren@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to free an array  in the function
Date: Mon, 29 Dec 2008 09:45:11 -0500
Organization: The MathWorks
Lines: 21
Message-ID: <MPG.23c2ac8465bfd68598990f@news.mathworks.com>
References: <gj43i6$l2n$1@fred.mathworks.com> <gj45e7$djo$1@fred.mathworks.com>
NNTP-Posting-Host: shurel.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
X-Trace: fred.mathworks.com 1230561912 17453 172.31.57.206 (29 Dec 2008 14:45:12 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 29 Dec 2008 14:45:12 +0000 (UTC)
User-Agent: MicroPlanet-Gravity/2.70.2067
Xref: news.mathworks.com comp.soft-sys.matlab:509078


In article <gj45e7$djo$1@fred.mathworks.com>, 
aclassyguywithaknotac@hotmail.com says...
> "zedong 
> " <zdongwu@gmail.com> wrote in message <gj43i6$l2n$1@fred.mathworks.com>...
> > for example:
> > function f()
> > a=ones(1000,10000);
> > .......%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?
> > b=zeros(1000,5000);%I must free a.
> > end% the end of the function
> 
> clear a
> 
> 

or set the variable to empty:
a = [];

-- 
Loren
http://blogs.mathworks.com/loren