From 8f4f9729a4456f9eed85dfd02c16d098834c3c35 Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Tue, 28 Sep 2010 16:30:40 +0200 Subject: [PATCH] fix: check for valid interpolation --- matlab/GetField_Interpolation.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/matlab/GetField_Interpolation.m b/matlab/GetField_Interpolation.m index 6690b54..10111eb 100644 --- a/matlab/GetField_Interpolation.m +++ b/matlab/GetField_Interpolation.m @@ -15,6 +15,10 @@ function [field_i mesh_i] = GetField_Interpolation(field, mesh, numLines, vararg % % See also ReadHDF5Dump ReadHDF5FieldData ReadHDF5Mesh +if (~isnumeric(numLines) || numel(numLines)~=3) + error('openEMS:GetField_Interpolation: numLines for interpolation must be a vector...'); +end + x = mesh.lines{1}; y = mesh.lines{2}; z = mesh.lines{3};