Student[NumericalAnalysis][Distance] - compute the distance between two matrices or vectors
|
Calling Sequence
|
|
Distance(A, B, p)
|
|
Parameters
|
|
A
|
-
|
Matrix or Vector
|
B
|
-
|
Matrix or Vector
|
p
|
-
|
nonnegative, infinity, -infinity, Frobenius, Euclidean; the norm selector
|
|
|
|
|
Description
|
|
•
|
The Distance command computes the distance between two matrices or two vectors with respect to a specified p-norm.
|
•
|
If A and B are both matrices then p must be one of 1, 2, infinity, Frobenius, or Euclidean.
|
•
|
If A and B are both vectors then p must be one of a non-negative number, infinity, -infinity, Frobenius, or Euclidean.
|
•
|
A and B must both be either vectors or matrices, not one of each.
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
| (7) |
>
|
|
| (8) |
>
|
|
| (9) |
|
|
Download Help Document
Was this information helpful?