MATLAB: How to sketch x[n] = 2e^(n.j.pi/6) +2e^(-n.j.pi/6) for 0

complex-valued exponential signal

I am relay knew to MATLAB and need to do this for an assignment. Any help would be appreciated.

Best Answer

Something like this?
syms x(n)
x(n)=piecewise(n>0 & n<5,2*exp(n*j*pi/6)+2*exp(-n*j*pi/6),0)
n=0:0.001:5;
plot(n,x(n))