Re: dealing with many data file (importing and manupilation)
- From: "Rune Allnor" <allnor@xxxxxxxxxxxx>
- Date: 16 Mar 2007 14:31:13 -0700
On 16 Mar, 22:16, "tatrek naser" <tknaser9...@xxxxxxxxxxx> wrote:
Hi guys,
I need help in making a code for importing and manupliating the data
from many files. for example i have over 100 data files showld be
read and the data will be extracted from them. The following code
just an example for importing data from specific file.
R14_00=importdata ('F:/data/SORA01_01000_200605_PM25');
pm25=R14_00.data(:,3:26);
my question is how to make it for all files without repeating such
lines for each one.
If all files are contained in one directory, try
FileList = dir('F:/data/');
data in FileList.From there on, find the file names by looping over the
The one possily troublesome issue from your example is
to extract the variable name pm25 from the file name.
It *can* be done by string manipulations to extract the
part of the file name, and then EVAL, but the more
seasoned matlab programmers consistently advice against
that particular solution.
Before getting into alternatives, is my assumption
correct in that the variable name pm25 is derived
from the latter part of the file name?
Rune
.
- Follow-Ups:
- Re: dealing with many data file (importing and manupilation)
- From: tatrek naser
- Re: dealing with many data file (importing and manupilation)
- References:
- dealing with many data file (importing and manupilation)
- From: tatrek naser
- dealing with many data file (importing and manupilation)
- Prev by Date: Re: 80 solution manual to various textbook(pdf)
- Next by Date: Re: Anyone running MATLAB on vista?
- Previous by thread: dealing with many data file (importing and manupilation)
- Next by thread: Re: dealing with many data file (importing and manupilation)
- Index(es):
Relevant Pages
|