Microscopy Image Browser 2.91
MIB
Loading...
Searching...
No Matches
distancePoints.m File Reference

DISTANCEPOINTS Compute distance between two points. More...

Functions

function dist = distancePoints (p1, p2, varargin)
 DISTANCEPOINTS Compute distance between two points.
 

Detailed Description

DISTANCEPOINTS Compute distance between two points.

Function Documentation

◆ distancePoints()

function dist = distancePoints ( p1,
p2,
varargin )

DISTANCEPOINTS Compute distance between two points.

D = distancePoints(P1, P2) Return the Euclidean distance between points P1 and P2.

If P1 and P2 are two arrays of points, result is a N1-by-N2 array containing distance between each point of P1 and each point of P2.

D = distancePoints(P1, P2, NORM) Compute distance using the specified norm. NORM=2 corresponds to usual euclidean distance, NORM=1 corresponds to Manhattan distance, NORM=inf is assumed to correspond to maximum difference in coordinate. Other values (>0) can be specified.

D = distancePoints(..., diag) compute only distances between P1(i,:) and P2(i,:).

See also
points2d, minDistancePoints, nndist, hausdorffDistance

References max.

Referenced by Lines3D.findClosestNode(), and triangulateCurvePair().

Here is the caller graph for this function: