Computers

Octave range Command

Octave range Command

In this tutorial, we will learn about the Octave range command. The range is an in-built function that returns the range of the input data, defined as the difference between the maximum and the minimum of the input data.

Syntax

The syntax of the range function is as follows:

>> range(X)

The argument X can be a vector or matrix.

Examples

>> X = [ 2 19 7 12 17]
X =

2 19 7 12 17

>> range(X)
ans = 17
>>

Octave Range Command

—

Octave Tutorials

Octave Tutorial on this website can be found at: