Matlab: AddPML allow single value for all directions

Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
pull/1/head
Thorsten Liebig 2012-07-18 16:03:27 +02:00
parent 7f4a0ccdaa
commit ef8ef75032
1 changed files with 4 additions and 0 deletions

View File

@ -27,6 +27,10 @@ function mesh = AddPML( mesh, numcells, CoordSystem )
% check
error( nargchk(2,3,nargin) );
if (numel(numcells)==1)
numcells = ones(6,1)*numcells;
end
numcells = reshape( numcells, 1, [] );
if numel(numcells) ~= 6
error( 'argument numcells needs to have exactly 6 elements' );