Loading multiple files

2 visualizaciones (últimos 30 días)
Kyriacos
Kyriacos el 20 de Abr. de 2012
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

Respuesta aceptada

Walter Roberson
Walter Roberson el 20 de Abr. de 2012
Leave out the ';' as it is not part of the file name.
  1 comentario
Kyriacos
Kyriacos el 20 de Abr. de 2012
thanks! I new it was a small detail...

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre File Operations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by