Octave – Aritmetica – III – 91

cviyyh_xeaa5q_r

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.

o502

Mapping Function: fix (x)
Truncate fractional portion of x and return the integer portion.
This is equivalent to rounding towards zero.

o503

Mapping Function: floor (x)
Return the largest integer not greater than x.
This is equivalent to rounding towards negative infinity.

o504

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.

o505

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.

0506

For two matrices (or a matrix and a scalar), return the pairwise maximum.

o507

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,

o508

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,

o509

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,

o510

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.

o511

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.

o512

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.

o513

Continua 😉
:mrgreen:

Posta un commento o usa questo indirizzo per il trackback.

Trackback

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo di WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione /  Modifica )

Google photo

Stai commentando usando il tuo account Google. Chiudi sessione /  Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )

Connessione a %s...

Questo sito utilizza Akismet per ridurre lo spam. Scopri come vengono elaborati i dati derivati dai commenti.

%d blogger hanno fatto clic su Mi Piace per questo: