On 6/5/2013 4:24 PM, Jonathan W Smith wrote:
> Hello:
>
> How do I read multiple netcdf files with ncread inside?
>
> I could list every file name like this:
>
> data_files = {'filename.nc', 'filename2.nc'}. How can I avoid this?
>For netcdf files, is there a command like dir for ascii and text files?
>
> Jonathan
>
Yes, there is a command like dir in Matlab, it is called dir :)
EDU>> help dir
just do
A=dir('*.nc')
and A will contain the names of all the .nc files in
the current folder. It is an struct array that has
one file in each struct.
--Nasser
> Hello:
>
> How do I read multiple netcdf files with ncread inside?
>
> I could list every file name like this:
>
> data_files = {'filename.nc', 'filename2.nc'}. How can I avoid this?
>For netcdf files, is there a command like dir for ascii and text files?
>
> Jonathan
>
Yes, there is a command like dir in Matlab, it is called dir :)
EDU>> help dir
just do
A=dir('*.nc')
and A will contain the names of all the .nc files in
the current folder. It is an struct array that has
one file in each struct.
--Nasser