Student[Calculus1] - Maple Programming Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Education : Student Packages : Calculus 1 : General : Student/Calculus1/Distance

Student[Calculus1]

 Distance
 find the distance between two points

 Calling Sequence Distance(p1, p2)

Parameters

 p1 - n-element list or n-Vector p2 - n-element list or n-Vector

Description

 • The command Distance(p1, p2) computes the distance between the points p1 and p2, which must have the same dimensionality (and orientation, when each of the points is a Vector).
 • This command is part of the Student[Calculus1] package, so it can be used in the form Distance(..) only after executing the command with(Student[Calculus1]).  However, it can always be used in the form Student[Calculus1][Distance](..).

Examples

 > $\mathrm{with}\left(\mathrm{Student}:-\mathrm{Calculus1}\right):$
 > $\mathrm{Distance}\left(\left[0,0\right],\left[1,2\right]\right)$
 $\sqrt{{5}}$ (1)
 > $\mathrm{Distance}\left(⟨1,2,3⟩,\left[0,-1,2\right]\right)$
 $\sqrt{{11}}$ (2)
 > $\mathrm{Distance}\left(⟨0,0⟩,⟨1,2⟩\right)$
 $\sqrt{{5}}$ (3)

Compatibility

 • The Student[Calculus1][Distance] command was introduced in Maple 2018.
 • For more information on Maple 2018 changes, see Updates in Maple 2018.

 See Also