Y = nthroot(X, N)
| Parameter | Description |
|---|---|
| X | Input array: scalar, vector, matrix or multidimensional array. |
| N | Roots to calculate: scalar or array of same size as X. |
| Parameter | Description |
|---|---|
| Y | result of 'nthroot'. |
π = nthroot(π, π) returns the real πth root of the elements ofπ.
Both π andπ must be real scalars or arrays of the same size. If an element inπ is negative, the corresponding element inπ must be an odd integer.
When computing roots where both real and complex roots exist, thepower function efficiently computes only the complex roots.
To obtain the real root in such cases, use the nthroot function instead.
X = [-2 -3 -2; 4 -2 -5]
N = [1 -1 3; 1/2 5 3]
Y = nthroot(X, N)
| Version | Description |
|---|---|
| 1.6.0 | initial version |