![]() |
DistancePURPOSE
Distance of a point to an interval matrix.
SYNOPSIS
function d=Distance(I,v)
DESCRIPTION
Distance of a point to an interval matrix. Distance of a point, v, w.r.t. an interval, I. In the current implementation it only works for one-dimensional intervals. Todo % check if this is actually used. CROSS-REFERENCE INFORMATION
This function calls:
SOURCE CODE
0001 function d=Distance(I,v) 0002 % Distance of a point to an interval matrix. 0003 % 0004 % Distance of a point, v, w.r.t. an interval, I. 0005 % 0006 % In the current implementation it only works for one-dimensional 0007 % intervals. 0008 % 0009 % Todo % check if this is actually used. 0010 0011 if (I.r==1) && (I.c==1) && (isa(v,'double')) && (size(v,1)==1) && (size(v,2)==1) 0012 if IsInside(I,v) 0013 d=0; 0014 else 0015 d=min(abs([I.lower I.upper]-v)); 0016 end 0017 else 0018 error('Wrong parameter type in interval distance'); 0019 end |