matlab: fix in ReadHDF5FieldData handling FD dumps

pull/1/head
Thorsten Liebig 2011-01-20 14:38:11 +01:00
parent ae3e15770e
commit faf377081d
1 changed files with 4 additions and 3 deletions

View File

@ -36,8 +36,8 @@ for n=1:numel(info.GroupHierarchy.Groups)
%search and read TD data %search and read TD data
if strcmp(info.GroupHierarchy.Groups(n).Groups(nGroup).Name,'/FieldData/TD') if strcmp(info.GroupHierarchy.Groups(n).Groups(nGroup).Name,'/FieldData/TD')
for m=1:numel(info.GroupHierarchy.Groups(n).Groups(nGroup).Datasets) for m=1:numel(info.GroupHierarchy.Groups(n).Groups(nGroup).Datasets)
hdf_fielddata.TD.names{m} = info.GroupHierarchy.Groups(n).Groups(nGroup).Datasets(m).Name; TD.names{m} = info.GroupHierarchy.Groups(n).Groups(nGroup).Datasets(m).Name;
hdf_fielddata.TD.time(m) = double(info.GroupHierarchy.Groups(n).Groups(nGroup).Datasets(m).Attributes.Value); TD.time(m) = double(info.GroupHierarchy.Groups(n).Groups(nGroup).Datasets(m).Attributes.Value);
end end
end end
%search and read FD data %search and read FD data
@ -52,7 +52,8 @@ for n=1:numel(info.GroupHierarchy.Groups)
end end
end end
if (numel(hdf_fielddata.TD.names)>0) if (numel(TD.names)>0)
hdf_fielddata.TD.names=TD.names;
for n=1:numel(hdf_fielddata.TD.names) for n=1:numel(hdf_fielddata.TD.names)
hdf_fielddata.TD.values{n} = double(hdf5read(file,hdf_fielddata.TD.names{n})); hdf_fielddata.TD.values{n} = double(hdf5read(file,hdf_fielddata.TD.names{n}));
end end