dis()

Description:

Calculate the Euclidean distance between two vectors.

Syntax:

dis(A,B)

Note:

The function gets the true straight line distance, the Euclidean distance, between vector A and vector B in an n-dimensional space.

Parameters:

A/B

Vector

Options:

@a

Calculate the sum of absolute values of the differences between numbers at same positions in vector A and vector B

@m

Average out the Euclidean distance before getting its square root

Return value:

Numeric value

Example:

 

A

 

1

[2,0,-8]

 

2

[0,-9,-2]

 

3

=dis(A1,A2)

11

4

=dis@a(A1,A2)

17

5

=dis@m([0,1],[1,2])

1