Message Boards Message Boards

0
|
7437 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

Shift Theorem of the Discrete Fourier Transform

Posted 11 years ago
I have a set of data points, {1, 8, 5, 0, 2}, and I want to take the DFT.
In[1]:= Fourier[{1, 8, 5, 0, 2}]

Out[1]= {7.15542 + 0. I,
0.0201626 + 3.86628 I, -2.47984 - 0.549434 I, -2.47984 + 0.549434 I,
0.0201626 - 3.86628 I}
If I shift everything by one spot, I get {8, 5, 0, 2, 1}.
In[2]:= Fourier[{8, 5, 0, 2, 1}]

Out[2]= {7.15542 + 0. I, 3.68328 + 1.17557 I, 1.68328 + 1.90211 I,
1.68328 - 1.90211 I, 3.68328 - 1.17557 I}
Is there a way that I could tell Mathematica to shift everything, or do I have to it manually?
Thank you in advance.
POSTED BY: sean roubion
Hi,

Try this:
RotateLeft[{1, 8, 5, 0, 2}, 1]
Take a look at documentation for RotateLeft and RotateRight, (also Permute,Permutations, ...)

I.M.
POSTED BY: Ivan Morozov
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract