My apology if following question is too simplistic to be asked but I have the following code which generates a nice sine
wave for me:
N=64;
X=zeros(N,1);
X(2)=-32j;
X(N)=32j;
x=ifft(X);
stem(real(x));
Now I was thinking I should be able to construct a cosine
wave in the similar way by changing the X(2)
and X(N)
values into some real mirrored values say X(2)=-32
and X(N)=32
. However, the output is not what I want i.e. a cosine
wave