surd
N th root
MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
surd(x
, n
)
For a complex number x
and integer n
, surd(x,
n)
returns the nth
root of x whose
(complex) argument is closest to that of x
.
If x
is a positive real number, surd(x,
n)
coincides with x^(1/n)
. If x
is
a negative real number and n
is odd, then surd(x,
n)
coincides with x^(1/n)
.
surd(x, n)
returns that complex solution y of y^{n} = x with
polar angle closest to that of x;
among two equally distant y's,
the one with smaller argument is chosen. In contrast, x^(1/n)
represents
the solution with the smallest absolute value of the polar angle in
the range .
If n
is a numerical value, it must be a nonzero
integer. If it is symbolic, it is understood to represent a nonzero
integer.
surd(x, 2)
is mathematically equivalent to sqrt(x)
.
Unlike sqrt
,
however, surd
may return an unevaluated symbolic
call.
When called with a floatingpoint argument, the function is
sensitive to the environment variable DIGITS
which determines
the numerical working precision.
If n is
odd and x is
real, then surd(x, n)
is real, too. On the other
hand, x^(1/n)
is not real if x is
negative:
surd(27, 3), surd(27.0, 3), (27)^(1/3), (27.0)^(1/3)
surd
may be called with symbolic arguments:
surd(3, n)
Sometimes, surd
returns an unevaluated function
call:
surd(x, 3), surd(x, n^2 + n)
 

Arithmetical expression.