Readint in multiple .cdf files from a text file
Afficher commentaires plus anciens
I am needing to open a large number of .cdf files and want to build a loop. Using the ls -1 > file.txt command I created a text file that lists all of the paths of the files I want to open. When I look at it in matlab it looks like this:
micro_use =
'/home/halleykh/test/arps5.2.12/output_test/micro_000600.cdf'
'/home/halleykh/test/arps5.2.12/output_test/micro_001200.cdf'
'/home/halleykh/test/arps5.2.12/output_test/micro_001800.cdf'
'/home/halleykh/test/arps5.2.12/output_test/micro_002400.cdf'
'/home/halleykh/test/arps5.2.12/output_test/micro_003000.cdf'
'/home/halleykh/test/arps5.2.12/output_test/micro_003600.cdf'
When using the netcdf.open command it says that the file name does not exist. I know that it's because of the single quotes. My question is, how do I remove them so that I can open the files in a loop? Thanks.
Réponses (1)
Ashish Uthama
le 12 Avr 2012
0 votes
Catégories
En savoir plus sur NetCDF Files 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!