Questions tagged [fft]

FFT is short for fast Fourier transform, any of a set of algorithms for quickly computing the discrete Fourier transform (DFT).

The FFT finds a lot of application in data analysis, particularly time-series and image data, and particularly when the data has a periodic nature, or at least a periodic component. The FFT also finds application in digital filtering. There are many FFT algorithms; they all calculate the Discrete Fourier Transform in O(n log n) operations, while the naive DFT implementation is O(n^2).

Mathematically, the Fourier Transform fits a set of sinusoids to the input data - revealing relative strengths of periodic components of the signal. The fit is optimal in a least-squared error sense. In the case of the Discrete Fourier Transform, the sinusoids are periodically related.

Related topics include DFT, signal processing, convolution, and window functions.

More information on FFT can be found in the Wikipedia article on FFT.

5308 questions
2
votes
1 answer

2D FFTW with MPI is too slow

I want to do 2D FFTW with MPI. I just followed the code shown in the answer of the previous post How to do a fftw3 MPI "transposed" 2D transform if possible at all?. However, the performance is really bad. In fact, the execution with 2 processors is…
2
votes
1 answer

Implementation of own fast fourier transform algorithm does not work

I have found and customized algorithm for fast fourier transform. The algorithm is below: function X = myFFT(x) %only works if N = 2^k N = numel(x); xp = x(1:2:end); xpp = x(2:2:end); if N>=8 Xp = myFFT(xp); Xpp =…
2
votes
3 answers

Fast Fourier Transform adjust scaling

I'm trying to show trends of my data by doing a FFT. The data I want to perform a FFT on looks like this: Within every year we see a clear trend almost like a sin wave and I thought this should be visible after a FFT transformation but I got…
Shaun
  • 461
  • 3
  • 5
  • 22
2
votes
1 answer

Sympy Simplify eliminate imaginary numbers

I'm trying to get the cosine similarity between convolved vectors. Because I'm using fast fourier transform, I am using complex numbers. In the calculation of the cosine similarity, the final value returned should be a real number. However, my…
2
votes
2 answers

My note detection algorithm is failing on few cases?

I am using a simple approach to find out the musical note using FFT in python steps involved are: Reading the sound file(.wave) Detecting silence in the file(by computing square sum of squared elements of input falling within the window) Detecting…
2
votes
1 answer

Why using magnitude method to get processed image?

Hi guys I’ve thinking about this question: I know that we use Fourier transform to get into frequency domain to process the image. I read the text book, it said that when we are done with processing the image in the Fourier domain we have to invert…
H_E_A_D
  • 101
  • 1
  • 1
  • 8
2
votes
1 answer

(iphone, objc) unexpected results from (fft/other spectral analysis) if user taps iphone during recording

I am currently using FFT / other spectral analysis algorithms in order to analyse sound from the iphone's microphone. However, if the user taps the device while recording, I get unexpected results. Is there a filter I can implement on the raw…
123hal321
  • 2,080
  • 4
  • 24
  • 25
2
votes
2 answers

fourier transformation as a dimensional reduction technique in python

My dataset has 2000 attributes and 200 samples. I need to reduce the dimensionality of it. To do this, I am trying to use Fourier transformation as a dimensional reduction. Fourier transformation returns the discrete Fourier transform when I feed…
user3104352
  • 1,100
  • 1
  • 16
  • 34
2
votes
1 answer

Zero padding fourier of image

I'm trying to solve a question, given an image f(x,y) at size N,M with fourier transform F. we define function g, which its fourier transform G is define as follows: G(x,y)=F(x,y) if x which means that we pad the image with zeros. I tried to check…
user2323232
  • 249
  • 2
  • 11
2
votes
0 answers

How to Convert a Float Array of Samples Into a Wav File in Java?

I am writing an app for android that increases the volume of specific frequencies of a sound file and I unfortunately can't use the built-in Android Equalizer because I need to increase the volume on the frequencies 4kHz, 6kHz and 8kHz. In order to…
shtevay
  • 21
  • 2
2
votes
4 answers

Opencl FFT libraries? Anything new or under the radar out there?

I googled this topic and didn't find anything new. I am aware of Nvidia's FFT implementation which is great, but for CUDA only. AMD just released their implementation, but it doesn't work on Nvidia cards. Apple has an older and slower…
smuggledPancakes
  • 9,881
  • 20
  • 74
  • 113
2
votes
1 answer

MATLAB Dftmtx for Huge "N"

I have a vector of size M (say 500), which I up-sample by a factor of MM=500, so that my new vector is now size N=500 x 500=250000. I am using an optimisation algorithm, and need to carryout the fft/dft of the up-sampled vector of size N using the…
Sal
  • 35
  • 8
2
votes
1 answer

Matlab: fourier coefficients of sign() function are oscillating

I'm writing a function that takes in a time-varying signal and returns the FFT. It follows the Matlab documentation: https://www.mathworks.com/help/matlab/math/fourier-transforms.html https://www.mathworks.com/help/matlab/ref/fftshift.html It…
eric
  • 7,142
  • 12
  • 72
  • 138
2
votes
2 answers

Calculate fft for each column or row in matrix

I have a problem with calculating fft for a signal which is stored in a matrix using matlab. I am trying to calculate fft for each column. I am trying to do this like this: for k = 1: ncol y1(k)= fft(y(:,k)); end where y is my matrix and and…
Ewa
  • 65
  • 3
  • 11
2
votes
1 answer

How to fix shift and scaling errors in an FFT-powered differentiation program?

So I am trying, like many others before me, to sift through all the celestial alignments of phase shifts and normalization coefficients necessary to make differentiation via Fourier transform work. I am trying to use as little code as possible,…
urquiza
  • 307
  • 2
  • 11