MATLAB: Matlab return me a complex number

complex returns

Hi, Why >>(-27)^(1/3) return me a complex number rather than -3??? I am curious about this. Please help.

Best Answer

From the documentation
doc power
"Note that for a negative value X and a non-integer value Y, if the abs(Y) is less than one, the power function returns the complex roots. To obtain the remaining real roots, use the nthroot function."