have large .h5 dataset that i need to read into matlab
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
First, I am new to matlab.
I have a large dataset that i need to read into matlab. I have already gone through all help files on read .h5 files which i don't have an issue with. however when i try to right a routine to read and then plot these files i get an error. Please see code below. The problem i have is the data files, when create, have non-sequential numbers and they change every time i run a new simulation. So i need to be able to call all the files with out knowing for certain what the numbers for each file. i thought that maybe i could use error handling to disregard the error so the program would not stop however i don't know if i could do that or if there is another way to load all the files from a folders and plot the data. the ultimate goal would be to make a movie of the data as it progresses in time, where each dataset is some time interval later in the simulation. Any help would be appreciated.
filename = 'cyc0000000.h5'; %starting filename here, check this
nimages = 0100000; %number of images here, check this
[basename,remain] = strtok(filename,'0');
[start,extension] = strtok(remain,'.');
nstart=str2num(start);
for k = (nstart+1):(nstart+nimages)
filename = strcat(basename,sprintf('%07d',k),extension);
%
n=hdf5read(filename, 'ne');
plot(r,n);
end
2 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur HDF5 dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!