nthroot

The real 𝑛th root of real number.

📝 Syntax

  • Y = nthroot(X, N)

📥 Input argument

  • X - Input array: scalar, vector, matrix or multidimensional array.

  • N - Roots to calculate: scalar or array of same size as X.

📤 Output argument

  • Y - result of 'nthroot'.

📄 Description

𝑌 = 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.

💡 Example

🔗 See also

power, sqrt.

🕔 History

Version
📄 Description

1.6.0

initial version

Last updated

Was this helpful?