Hi all,
files = dir('*.nc4') ;nfiles = length(files) ;P = cell(nfiles,1) ; % precipitation of all files
date = cell(nfiles,2) ;time = cell(nfiles,2) ;for i = 1:nfiles %%Read dat
date{i,1} = ncreadatt(files(i).name,'/','HDF5_GLOBAL.BeginDate') ; date{i,2} = ncreadatt(files(i).name,'/','HDF5_GLOBAL.EndDate') ; %%Read time
time{i,1} = ncreadatt(files(i).name,'/','HDF5_GLOBAL.BeginTime') ; time{i,2} = ncreadatt(files(i).name,'/','HDF5_GLOBAL.EndTime') ; %%REad precipitation
P{i} = ncread(files(i).name,'precipitation') ;end
I added the following part, in order to export the array "P" as excel format. Please, I have basic knowledge to solve this problem. I appreciate your help and time!
Majid
i=1:nfilesX=[{'P'};P]xlswrite('f',X)end
Best Answer