matlab fix for missing range functions

Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
This commit is contained in:
Thorsten Liebig 2014-06-07 20:24:04 +02:00
parent b04b80daf6
commit b3bb76e62d
2 changed files with 7 additions and 1 deletions

View File

@ -83,4 +83,10 @@ for n=1:2:(nargin-1)
end
end
end
end
end
function rng = range(x)
rng = max(x)-min(x);
end

View File

@ -51,7 +51,7 @@ substrate.kappa = 0.0013 * 2*pi*f0 * EPS0*substrate.epsR;
substrate.thickness = 1.524;
substrate.cells = 4;
substrate.width = patch.W + range(xpos) + 4*patch.l;
substrate.width = patch.W + max(xpos) - min(xpos) + 4*patch.l;
substrate.length = 3*patch.l + patch.L;
% size of the simulation box