problem with automatic files loading :/
problem with automatic files loading :/
(OP)
Hi all!
I have this kind of a problem. I need to load 33 files such as A0.txt, A1.txt, A2.txt...A32.txt. Of course, i can do this by simply typing:
load A0.txt
load A1.txt
.
.
.
load A32.txt
But when i would like to load 100 files this solution isn't a good idea. I think for loop would be perfect, but i don't know how to merge variable with .txt extention :/ I tried this:
for i=0:1:32
load 'A' & i & '.txt'
end
or
for i=0:1:32
load 'A' + i + '.txt'
end
but this doesn't work :(
If anybody can help me, please answer or give a clue. Thnx!
I have this kind of a problem. I need to load 33 files such as A0.txt, A1.txt, A2.txt...A32.txt. Of course, i can do this by simply typing:
load A0.txt
load A1.txt
.
.
.
load A32.txt
But when i would like to load 100 files this solution isn't a good idea. I think for loop would be perfect, but i don't know how to merge variable with .txt extention :/ I tried this:
for i=0:1:32
load 'A' & i & '.txt'
end
or
for i=0:1:32
load 'A' + i + '.txt'
end
but this doesn't work :(
If anybody can help me, please answer or give a clue. Thnx!





RE: problem with automatic files loading :/
for i=0:1:32
load(['A' int2str(i) '.txt'])
end
But how can i display the read data after opening every file?
If i take one simple file and type:
load A0.txt
Then I only need to type:
A0
And the data is being displayed, but how to do this with seweral files? When i type after the load:
['A' int2str(i)]
I recieve for example:
A0
:/
RE: problem with automatic files loading :/
M
--
Dr Michael F Platten