HyperMath

Subrange

Subrange

Previous topic Next topic No expanding text in this topic  

Subrange

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

Extract the indices for a subrange of values from a vector.

Syntax

S = Subrange(V, lower, upper, start, stop)

Arguments

Name

Description

 

V

A vector of real values.

 

lower

The lower subrange bound. A real scalar.

 

upper

The upper subrange bound. A real scalar.

 

start

(optional)

The starting index for the search. A positive integer. Defaults to 1.

 

stop

(optional)

The stopping index for the search. A positive integer. Defaults to the length of V.

Output

Name

Description

 

S

A vector containing the indices of the subrange.

Example

Find the indices of [11:1:20] in the range (14.5,18.5).

 

Syntax

 

S = Subrange([11:1:20], 14.5, 18.5).

 

Result

 

S = 5, 6, 7, 8

See Also:

Eps

Suppress