matlab: enable non comlex FD dump to read
todo: the matlab function should use the number of frequencies in the hdf5 file in the futurepull/1/head
parent
6024eb1e91
commit
4dab50a3f1
|
@ -61,10 +61,15 @@ if (numel(TD.names)>0)
|
|||
end
|
||||
|
||||
if (numel(FD.names)>0)
|
||||
Nr_freq = numel(FD.names)/2;
|
||||
Nr_freq = numel(FD.names)
|
||||
for n=1:Nr_freq
|
||||
name = ['/FieldData/FD/f' int2str(n-1) '_real'];
|
||||
ind = find(strcmp(FD.names,name));
|
||||
if isempty(ind)
|
||||
ind = find(strcmp(FD.names,['/FieldData/FD/f' int2str(n-1)]));
|
||||
hdf_fielddata.FD.values{n} = double(hdf5read(file,FD.names{ind}));
|
||||
hdf_fielddata.FD.freq(n) = FD.freq(ind);
|
||||
else
|
||||
hdf_fielddata.FD.values{n} = double(hdf5read(file,FD.names{ind}));
|
||||
hdf_fielddata.FD.freq(n) = FD.freq(ind);
|
||||
name = ['/FieldData/FD/f' int2str(n-1) '_imag'];
|
||||
|
@ -72,6 +77,7 @@ if (numel(FD.names)>0)
|
|||
hdf_fielddata.FD.values{n} = hdf_fielddata.FD.values{n} + 1j*double(hdf5read(file,FD.names{ind}));
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function hdf_fielddata = ReadHDF5FieldData_octave(file)
|
||||
|
|
Loading…
Reference in New Issue