Message Boards Message Boards

0
|
5287 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Putting Data into Fourier

Posted 10 years ago
Attached is some data that I was given that I'm told is the accoustic read out of a sperm whale. How can I tell Matheatica to take that data and do the a Fourier Transform with it.

In other words, I want to do this:
Fourier[{Insert data here}]

Thank you in advance
Attachments:
POSTED BY: sean roubion
2 Replies
https://reference.wolfram.com/mathematica/tutorial/FourierTransforms.html<br>
POSTED BY: Frank Kampas
Posted 10 years ago
Hi Sean,
Frank's reference is a good place to start. But also, I note that the format of the data in your notebook is not very useful in Mathematica. There are two issues:

1) The repeated values separated by newlines will generate repeated input resulting in repeated outputs, rather than a list of values. Most probably, you need to import the data, or if inputting it as an input cell it would need to be properly structured as a List in Mathematica. I dealt with this by saving the data as a txt file and then doing an import.

2) There is a notation for scientific format using "^" in place of "E" not recognized by Mathematica. I dealt with this by Importing the data as a String, using StringReplace to change the "^" into "E" so the numbers would be in E format, and then Importing from the String into a data table as a List. (Which I also flattened to a single list.)

Having done this, the imported data can be Fourier transformed easily. To understand the format of the output, and the relationship between sample interval and frequencies, you shoud refer to Frank's suggested link.  I've attached both files.

Best regards,

David
Attachments:
POSTED BY: David Keith
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