Path: news.mathworks.com!not-for-mail
From: "Francesco " <fsarnari@maths.leeds.ac.uk>
Newsgroups: comp.soft-sys.matlab
Subject: "for" loop & string
Date: Sun, 2 Sep 2007 21:16:14 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 26
Message-ID: <fbf96u$i98$1@fred.mathworks.com>
Reply-To: "Francesco " <fsarnari@maths.leeds.ac.uk>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1188767774 18728 172.30.248.35 (2 Sep 2007 21:16:14 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 2 Sep 2007 21:16:14 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 277707
Xref: news.mathworks.com comp.soft-sys.matlab:426698



Hi Everybody,
I have the following problem:
I would like to load a number N of files, say something 
like

for i=1:N
   load filename_i.mat
   ...
   ...
end

where i is an integer (and positive) number.
Could you tell me how shall I introduce the index of 
my loop into the filename?
Could you pls give me a simple example of that?
Many thanks,
Francesco