HyperMath

MinHyperSphere

MinHyperSphere

Previous topic Next topic No expanding text in this topic  

MinHyperSphere

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Find the smallest enclosing N-dimensional sphere for a set of points.

Syntax

center, radius, support = MinHyperSphere(points, direction)

Arguments

Name

Description

 

points

A matrix of coordinate points to be enclosed.

 

direction (optional)

The direction in which points are stored, either
byRow’ (default) or ‘byCol’.

Output

Name

Description

 

center

The center of the minimum sphere.

 

radius

The radius of the minimum sphere.

 

support

The set of original points that constrain the minimum sphere.

Example 1

Find the smallest enclosing circle for the points
[9, 8; -2, 10; 6, 1; -3, 5] that are stored by row.

 

Syntax

pointSet = [9, 8; -2, 10; 6, 1; -3, 5]

center, radius, support = MinHyperSphere(pointSet)

 

Result

center = 3.02   6.42

radius = 6.1852

support = [6, 1; 9, 8; -3, 5]

Comments

The points in the support set will not typically occur in the same order that they are found in the input matrix.