Suppose I enter a complex number, say $$z = -2e^{i\pi/6}$$
And, I have to get the phase of "z" as $[\pi/6]$ only. But when I try to retrieve the phase using 'angle(z)' in matlab, it would display the phase as $[(\pi/6)-\pi]$. I understand the reason behind shift of angle "$\pi$" and I don't want this to happen in my original phase. Please help me out on this problem.
The correct polar form representation of a complex number is $z = re^{i\theta}$ where $r > 0$. Matlab, correctly, interpreted $-2e^{i \frac{\pi}{6}}$ as $2e^{i \frac{-5\pi}{6}}$. If you want to use a nonstandard phase shift, then add $\pi$ to any negative phase shifts.