## Octave – Aritmetica – III – 91 Continuo da qui a copiare qui.

Utilities – I

Mapping Function: `ceil (x)`
Return the smallest integer not less than `x`.
This is equivalent to rounding towards positive infinity. Mapping Function: `fix (x)`
Truncate fractional portion of `x` and return the integer portion.
This is equivalent to rounding towards zero. Mapping Function: `floor (x)`
Return the largest integer not greater than `x`.
This is equivalent to rounding towards negative infinity. Mapping Function: `round (x)`
Return the integer nearest to `x`.
If `x` is complex, return `round (real (x)) + round (imag (x)) * I`. If there are two nearest integers, return the one further away from zero. Mapping Function: `roundb (x)`
Return the integer nearest to `x`.
If `x` is complex, return `round (real (x)) + round (imag (x)) * I`. If there are two nearest integers, return the one further away from zero.

Built-in Function: `max (x)`
Built-in Function: `max (x, [], dim)`
Built-in Function: `[w, iw] = max (x)`
Built-in Function: `max (x, y)`

Find maximum values in the array `x`.
For a vector argument, return the maximum value. For a matrix argument, return a row vector with the maximum value of each column. For a multi-dimensional array, max operates along the first non-singleton dimension.
If the optional third argument `dim` is present then operate along this dimension. In this case the second argument is ignored and should be set to the empty matrix. For two matrices (or a matrix and a scalar), return the pairwise maximum. For complex arguments, the magnitude of the elements are used for comparison. If the magnitudes are identical, then the results are ordered by phase angle in the `range (-pi, pi)`. Hence, because all entries have magnitude 1, but -1 has the largest phase angle with value `pi`.
If called with one input and two output arguments, max also returns the first index of the maximum value(s). Thus, Built-in Function: `min (x)`
Built-in Function: `min (x, [], dim)`
Built-in Function: `[w, iw] = min (x)`
Built-in Function: `min (x, y)`

Find minimum values in the array `x`.
For a vector argument, return the minimum value. For a matrix argument, return a row vector with the minimum value of each column. For a multi-dimensional array, min operates along the first non-singleton dimension.
If the optional third argument `dim` is present then operate along this dimension. In this case the second argument is ignored and should be set to the empty matrix.
For two matrices (or a matrix and a scalar), return the pairwise minimum.

Non riporto gli esempi che sono simili a quelli di max.

For complex arguments, the magnitude of the elements are used for comparison. If the magnitudes are identical, then the results are ordered by phase angle in the `range (-pi, pi)`. Hence, because all entries have magnitude 1, but -i has the smallest phase angle with value `-pi/2`.

Built-in Function: `cummax (x)`
Built-in Function: `cummax (x, dim)`
Built-in Function: `[w, iw] = cummax (...)`

Return the cumulative maximum values along dimension `dim`.
If `dim` is unspecified it defaults to column-wise operation.
If called with two output arguments the index of the maximum value is also returned. Built-in Function: `cummin (x)`
Built-in Function: `cummin (x, dim)`
Built-in Function: `[w, iw] = cummin (x)`

Return the cumulative minimum values along dimension `dim`.
If `dim` is unspecified it defaults to column-wise operation.
If called with two output arguments the index of the minimum value is also returned. Built-in Function: `hypot (x, y`)
Built-in Function: `hypot (x, y, z, ...)`

Compute the element-by-element square root of the sum of the squares of `x` and `y`.
This is equivalent to `sqrt (x.^2 + y.^2)`, but is calculated in a manner that avoids overflows for large values of `x` or `y`.
`hypot` can also be called with more than 2 arguments; in this case, the arguments are accumulated from left to right, `hypot (hypot (hypot (x, y), z), w)`, etc. Continua 😉 Posta un commento o usa questo indirizzo per il trackback.