Student[NumericalAnalysis] - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Education : Student Package : Numerical Analysis : Computation : Student/NumericalAnalysis/Distance

Student[NumericalAnalysis]

  

Distance

  

compute the distance between two matrices or vectors

 

Calling Sequence

Parameters

Description

Examples

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

withStudent[NumericalAnalysis]:

AMatrix1.432,5.223,6.444,5.325,7.453,8.223,6.432,8.343,8.222

A:=1.4325.2236.4445.3257.4538.2236.4328.3438.222

(1)

BMatrix5.224,9.809,8.932,0.424,8.453,3.532,2.533,9.435,0.423

B:=5.2249.8098.9320.4248.4533.5322.5339.4350.423

(2)

DistanceA,B,∞

12.790

(3)

DistanceA,B,Frobenius

12.87808806

(4)

DistanceA,B,1

14.978

(5)

aVector2.42,5.34,8.78,0.42

a:=2.425.348.780.42

(6)

bVector4.32,9.32,6.22,1.33

b:=4.329.326.221.33

(7)

Distancea,b,3.1

4.401239994

(8)

Distancea,b,∞

0.91

(9)

See Also

LinearAlgebra[Norm]

Student[LinearAlgebra]

Student[NumericalAnalysis]

Student[NumericalAnalysis][ComputationOverview]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam