I am trying to extract a specific layer from multiple ( > 4000 ) HDF5 files
. I used the code below. It worked, but when I tried to load the new saved files, they were not recognized as HDF5
. Help would be highly appreciated.
files=dir('C:\OLD_GPM\*.HDF5') % Open dataset
for j = 1:numel(files)
r = h5read(files(j).name,'/Grid/precipitationCal');% Read the correct layer "Precipitation calibrated mm/hr"
save([''C:\New_GPM\' files(j).name],'r'); % save this layer
end