Read certain files from a directory in matlab?
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (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 Commento
Jay
il 27 Gen 2013
Categorie
Scopri di più su File Operations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!