By convention, $-\frac12 + \frac{\sqrt3}2i \approx -0.5+0.866i$ is the principal value of $(-1)^\frac23$.

In particular, Matlab is presumably evaluating $(-1)^\frac23$ as $\exp(\frac23\log(-1))$ and choosing the principal branch of the logarithm, where $\log(-1) = \pi i$, and thus ending up with

$$\begin{aligned} (-1)^\frac23 &= \exp\left(\tfrac23\log(-1)\right) \\ &= \exp\left(\tfrac23\pi i\right) \\ &= -\frac12+\frac{\sqrt3}2 i \\ &\approx -0.5+0.866i. \end{aligned}$$


Terminology. The way Matlab seems to be seeing this, when you ask for $k^{2/3}$, you are asking for the number $z$ that solves the equation $$ z^3 = k^2. $$

In case $k = -1$, there are three solutions to this equation in the complex plane, one of which happens to be the real number 1, and for some reason Matlab has instead given you the one in the second quadrant. I am a little surprised that it is reading the input this way; it seems to me that from the standpoint of applied math it ought to return the unique real root when it exists, unless you specifically ask it not to.


If the argument of the function is taken to be a complex number, the roots of (negative) unity are given by the equation $e^\frac{i\pi(2k - 1)}{n}, k = 1,2,3...n.$ So for $n=3$, the third roots of unity will be $e^\frac{i\pi}{3} \approx 0.5 + 0.866i $, $e^{i\pi} = -1$, and $e^\frac{i5\pi}{3} \approx 0.5 - 0.866i$. Squaring these gives the three solutions mentioned above by countinghaus: $-0.5 + 0.866i$, $1$, and $-0.5 - 0.866i$.