how can I load file.txt in matlab? -
i have folder contained several files in loc1.txt loc2.txt .... loc10.txt want use them in matlab code :
for i=1:10 myfile =['e:\dis\locs\loc' '.txt']; b= importdata(myfile);
but not work , output : 'e:\dis\locs\loc .txt'
there body me here?
you need convert i
characters.
myfile =['e:\dis\locs\loc' num2str(i) '.txt'];
Comments
Post a Comment