Loading multiple files

조회 수: 3 (최근 30일)
Kyriacos
Kyriacos 2012년 4월 20일
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.
  댓글 수: 1
Kyriacos
Kyriacos 2012년 4월 20일
thanks! I new it was a small detail...

댓글을 달려면 로그인하십시오.

추가 답변 (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