Loading multiple files

2 次查看(过去 30 天)
Hello,
I am trying to load several files using a loop. The files are called:
SIMGAtheta1_0.mat
SIMGAtheta2_0.mat
SIMGAtheta3_0.mat
...
I do not understand why this is not working:
q=0;
for kk=1:10;
s = (['SIMGAtheta', num2str(kk), '_', num2str(q),';']);
load(s)
end
I am in the directory that the files are saved. Thanks!
Kyriacos

采纳的回答

Walter Roberson
Walter Roberson 2012-4-20
Leave out the ';' as it is not part of the file name.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 File Operations 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by