Read certain files from a directory in matlab?
Mostrar comentarios más antiguos
Hello,
I have over 100 .mat files in a directory and I am wondering how can I read and plot some of them. For example the file names are like such:
XX11YZ08 , XX12YZ07, XX13YZ08, XX14YZ06, XX15YZ08, and so on...
I would like to read and plot the data from all the files whose name end with '08'.
Thanks a lot in advance
Respuesta aceptada
Más respuestas (1)
Load the file within the 'for' loop and use the plot command followed by 'hold on' (use the hold on and plot within the loop)
if you want each to be in a different color, then you may have to create a string array with the colour codes and use them in the plot command with the (i),,,
Hope this helps
Cheers
Nike
1 comentario
Jay
el 27 de En. de 2013
Categorías
Más información sobre File Operations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!