Institut de Robòtica i Informàtica Industrial

Distance

PURPOSE ^

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:
  • size Number of poses in a trajectory.
  • size Size of the state estimated in the filter
  • IsInside Checks if a point is inside an interval.
  • size Size (rows/columns) of an interval matrix.
  • size Number of parameters of the pose.
  • size Number of readings stored in the Sensor.
This function is called by:

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


Institut de Robòtica i Informàtica Industrial

Generated on Fri 24-Jul-2009 12:32:50 by m2html © 2003