Read certain files from a directory in matlab?
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (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 commentaire
Jay
le 27 Jan 2013
Catégories
En savoir plus sur File Operations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!