MATLAB: Real and imaginary part of complex number

complex numberimaginary partMATLABreal part

Hi,
I'm trying to get the real and imaginary part of a formular in a limited range of a parameter n.
how do I add in my formular
syms n real
imag (1i^n)
that 0 < n < 1 ?
Thanks a lot!

Best Answer

V = complex(randi([-10 10],1), randi([-10 10])); %some data to work on
syms n real
Vn = V^(1/n);
RV = rewrite( real(Vn), 'exp');
IV = rewrite( imag(Vn), 'exp');