I’m trying to write a loop statement in Mathematica so that I get the output that looks a little something like this:
{ 1, Exp[-I*2*Pi/5], Exp[-I*2*Pi*2/ 5], Exp[-I*2*Pi*3/5], Exp[-I*2*Pi*4/5, …}.
Does anybody know what I must do to get it to give a simliar output above? The output doesn’t have to be exact; it can be in aproximate form (real part + imaginary part).
Thank you in advance.
k = 1;
A = 5;
a0 = 0;
a0 = a;
n = 4;
F0 = 0;
Do[ F = F - I*2*Pi*k*(a)/(A); Print[Exp[F]], {i, 0, n}]
If you are only using this for calculations and don’t care about the exact formatting then this might be simpler
In[4]:= k = 1;A = 5; n = 4;Table[Exp[-I*2*Pi*k*i/A], {i, 0, n}]
Out[6]= {1, E^(-((2 I \[Pi])/5)), E^(-((4 I \[Pi])/5)), E^((4 I \[Pi])/5), E^((2 I \[Pi])/5)}