have large .h5 dataset that i need to read into matlab

1 Ansicht (letzte 30 Tage)
Eric Dutra
Eric Dutra am 8 Dez. 2016
Kommentiert: per isakson am 9 Dez. 2016
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 Kommentare
KSSV
KSSV am 8 Dez. 2016
where is r? I think that's why a error.
per isakson
per isakson am 9 Dez. 2016
"I get an error" &nbsp Please show us the error message.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by