From 79c742ffc71ecfe38dda8ef4f8406080b840414d Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Thu, 16 Dec 2010 13:42:43 +0100 Subject: [PATCH] matlab docu update --- matlab/GetField_Interpolation.m | 12 +++++++++++- matlab/ReadHDF5Dump.m | 8 ++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/matlab/GetField_Interpolation.m b/matlab/GetField_Interpolation.m index 1be9ab5..abc8490 100644 --- a/matlab/GetField_Interpolation.m +++ b/matlab/GetField_Interpolation.m @@ -1,10 +1,21 @@ function [field_i mesh_i] = GetField_Interpolation(field, mesh, lines, varargin) % [field_i mesh_i] = GetField_Interpolation(field, mesh, lines, varargin) % +% Get an interpolated field, e.g. read by ReadHDF5Dump +% +% homogen interpolation given by a 3x1 vector: e.g. [21,1,101] +% +% abitrary interpolation on a given mesh: +% e.g.: mesh_interp.lines{1} = linspace(0, 1,101) * 1e-3; +% mesh_interp.lines{2} = linspace(0,0.5, 51) * 1e-3; +% mesh_interp.lines{3} = linspace(0,0.2, 21) * 1e-3; +% % example: % [field mesh] = ReadHDF5Dump('Et.h5'); % %interpolate on a mesh with 21x21x101 lines % [field_i mesh_i] = GetField_Interpolation(field, mesh, [21 21 101]); +% or +% [field_i mesh_i] = GetField_Interpolation(field, mesh, mesh_interp); % % %or both steps in one with the same result: % [field_i mesh_i] = ReadHDF5Dump('Et.h5','Interpolation', [21 21 101]); @@ -14,7 +25,6 @@ function [field_i mesh_i] = GetField_Interpolation(field, mesh, lines, varargin) % author: Thorsten Liebig % % See also ReadHDF5Dump ReadHDF5FieldData ReadHDF5Mesh - if ((~iscell(lines) && ~isnumeric(lines)) || numel(lines)~=3) error('openEMS:GetField_Interpolation: numLines for interpolation must be a vector...'); end diff --git a/matlab/ReadHDF5Dump.m b/matlab/ReadHDF5Dump.m index 8e61c25..b263f95 100644 --- a/matlab/ReadHDF5Dump.m +++ b/matlab/ReadHDF5Dump.m @@ -1,5 +1,12 @@ function [field mesh] = ReadHDF5Dump(file, varargin) %[field mesh] = ReadHDF5Dump(file, varargin) +% +% Read a hdf5 field dump, including an interpolation and frequency domain +% transformation. +% +% possible arguments: +% 'Interpolation' see GetField_Interpolation +% 'Frequency' see GetField_TD2FD % % example: % [field mesh] = ReadHDF5Dump('Et.h5'); @@ -11,6 +18,7 @@ function [field mesh] = ReadHDF5Dump(file, varargin) % author: Thorsten Liebig % % See also ReadHDF5Mesh ReadHDF5FieldData GetField_Interpolation +% GetField_TD2FD field = ReadHDF5FieldData(file); mesh = ReadHDF5Mesh(file);