Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Severing ties between Matlab and data files when programming
Date: Wed, 31 Dec 2008 16:40:19 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 13
Message-ID: <gjg79j$u7$1@fred.mathworks.com>
References: <gjg5s2$533$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1230741619 967 172.30.248.37 (31 Dec 2008 16:40:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 31 Dec 2008 16:40:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 791003
Xref: news.mathworks.com comp.soft-sys.matlab:509352


"Ryan Utz" <rutz@al.umces.edu> wrote in message <gjg5s2$533$1@fred.mathworks.com>...
> I'm constantly constructing m-files that batch process or analyze a number of .csv files. When I'm working on one and it messes up for whatever reason (i.e. an error occurs and the process is interrupted), I find that I cannot move, delete, or make changes on the data file that it was last working on. If I try to, Windows tells me that another program (Matlab) is operating on the file (or something to the tune of that), even though Matlab is no longer 'Busy', the error has been posted, and a fresh >> is in the command line. 
> 
> The only solution I've found to this is to shut down Matlab completely, do what I need to to the data file in question, and restart Matlab to start work again. There has got to be a better way. I'm guessing (and hoping) it's something simple. 'clear' doesn't do the trick.  
> 
> Anyone have a solution?
> 
> Thanks,
> Ryan


status = fclose('all') closes all open files (except standard input, output, and error), returning 0 if successful and -1 if unsuccessful.