AnalyzeNF2FF depreciated message & some checks
parent
d0d2593ab3
commit
b74dd90558
|
@ -19,7 +19,7 @@ function [E_theta,E_phi,Prad,Dmax] = AnalyzeNF2FF( Sim_Path, nf2ff, f, theta, ph
|
||||||
%
|
%
|
||||||
% example:
|
% example:
|
||||||
% see examples/NF2FF/infDipol.m
|
% see examples/NF2FF/infDipol.m
|
||||||
%
|
%
|
||||||
% See also CreateNF2FFBox
|
% See also CreateNF2FFBox
|
||||||
%
|
%
|
||||||
% (C) 2010 Sebastian Held <sebastian.held@gmx.de>
|
% (C) 2010 Sebastian Held <sebastian.held@gmx.de>
|
||||||
|
@ -31,6 +31,8 @@ if ~isscalar(f)
|
||||||
error 'Currently only one frequency is supported. Call this function multiple times.'
|
error 'Currently only one frequency is supported. Call this function multiple times.'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
warning('openEMS:AnalyzeNF2FF','This function is depreciated , use CalcNF2FF instead');
|
||||||
|
|
||||||
filenames_E = nf2ff.filenames_E;
|
filenames_E = nf2ff.filenames_E;
|
||||||
filenames_H = nf2ff.filenames_H;
|
filenames_H = nf2ff.filenames_H;
|
||||||
|
|
||||||
|
@ -41,16 +43,21 @@ end
|
||||||
% read time domain field data and transform into frequency domain
|
% read time domain field data and transform into frequency domain
|
||||||
for n=find(nf2ff.directions==1)
|
for n=find(nf2ff.directions==1)
|
||||||
[Ef{n}, E_mesh{n}] = ReadHDF5Dump( [Sim_Path '/' filenames_E{n} '.h5'], 'Frequency', f );
|
[Ef{n}, E_mesh{n}] = ReadHDF5Dump( [Sim_Path '/' filenames_E{n} '.h5'], 'Frequency', f );
|
||||||
|
|
||||||
|
if (Ef{n}.FD.freq(1) ~= f)
|
||||||
|
error 'frequency mismach'
|
||||||
|
end
|
||||||
|
|
||||||
%clear out time domain data
|
%clear out time domain data
|
||||||
Ef{n} = rmfield(Ef{n},'TD');
|
if isfield(Ef{n},'TD')
|
||||||
|
Ef{n} = rmfield(Ef{n},'TD');
|
||||||
|
end
|
||||||
|
|
||||||
[Hf{n}, H_mesh{n}] = ReadHDF5Dump( [Sim_Path '/' filenames_H{n} '.h5'], 'Frequency', f );
|
[Hf{n}, H_mesh{n}] = ReadHDF5Dump( [Sim_Path '/' filenames_H{n} '.h5'], 'Frequency', f );
|
||||||
%clear out time domain data
|
%clear out time domain data
|
||||||
Hf{n} = rmfield(Hf{n},'TD');
|
if isfield(Hf{n},'TD')
|
||||||
|
Hf{n} = rmfield(Hf{n},'TD');
|
||||||
% matlab error concerning memory management
|
end
|
||||||
% perform memory garbage collection
|
|
||||||
pack
|
|
||||||
|
|
||||||
% reshape mesh into row vector
|
% reshape mesh into row vector
|
||||||
mesh{n}.x = reshape( E_mesh{n}.lines{1}, 1, [] );
|
mesh{n}.x = reshape( E_mesh{n}.lines{1}, 1, [] );
|
||||||
|
|
Loading…
Reference in New Issue