Message Boards Message Boards

0
|
5557 Views
|
7 Replies
|
1 Total Likes
View groups...
Share
Share this post:

How to get the same FFT result in Mathematica?

Posted 10 years ago

Hello all, I write because i have a doubt that is actually costing me resolve, my professor i shared a code in Matlab to understand something that he explained, the problem is that I do not know how to do this in Mathematica. Code in question is:

From matlab

fft2([1,1,2;3,5,8;13,21,24])

the output is

ans =

   78.0000 +  0.0000i  -13.5000 +  6.0622i  -13.5000 -  6.0622i

  -33.0000 + 36.3731i    6.0000 -  6.9282i    6.0000 -  3.4641i

  -33.0000 - 36.3731i    6.0000 +  3.4641i    6.0000 +  6.9282i

I write in mathermatica

Fourier[{{1,1,2},{3,5,8},{13,21,24}}]

but the result is wrong, any idea de how to get the same answer.

Thanks in advance

POSTED BY: Luis Ledesma
7 Replies

The really good stuff in the documentation is under "Details and Options".

POSTED BY: Frank Kampas
Posted 10 years ago

Daniel check the documentation of the command in question but as he had not understood well the concept,it seemed to me that was not in the documentation, but thank you for your suggestion i will into consideration for future questions.

POSTED BY: Luis Ledesma
Posted 10 years ago

W. Craig Carter thanks for your quick response and concise, was confused about the Fourier command but thanks your help'm learning more.

Luis Ledesma.

POSTED BY: Luis Ledesma

Umm, did you check the Documentation Center on Fourier? Because really that's the first place to look when the software gives a surprising result.

POSTED BY: Daniel Lichtblau

Hello Danny, I should have indicated that the code I pasted gives the result that he is seeing with the other software.

POSTED BY: W. Craig Carter

Luis, It is perfectly acceptable, and reasonable, and useful, to mention in a question that the documentation was checked (and perhaps not well understood, as was apparently the case here). Even better would be to indicate what specifically you had checked in the documentation. That way a respondent, such as Craig Carter in this case, might have a better idea of what is the misunderstanding, and perhaps how to explain the remedy.

POSTED BY: Daniel Lichtblau

This reproduces the result in the OP's post.

Fourier[{{1, 1, 2}, {3, 5, 8}, {13, 21, 24}}, 
     FourierParameters -> {1, -1}]
POSTED BY: W. Craig Carter
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