n=[0:30]; a=0.9*exp(i*pi/5); c=1;%*exp(i*pi/2); % x(t) in complex form x=c*(a.^n); % amplitude of x(t) x_abs=abs(x); % phase of x(t); x_phase=phase(x); % real of x(t) x_real=real(x); % imaginary of x(t) x_img=imag(x); close all; figure(1); subplot(2,2,1); stem(n,x_real); title('real'); subplot(2,2,2); stem(n,x_img); title('imaginary'); subplot(2,2,3); stem(n,x_abs); title('amplitude'); subplot(2,2,4); stem(n,x_phase); title('phase');