Questions tagged [dft]

Discrete Fourier transform (DFT) is a specific kind of discrete transform, used in Fourier analysis.

Given a sequence of N samples f(n), indexed by n = 0..N-1, the discrete Fourier transform (DFT) is defined as F(k), where k=0..N-1:

Enter image description here

Source: engineeringproductivitytools

428 questions
2
votes
1 answer

Discrete Cosine Transform (DCT) Coefficient Distribution

I have two images : Original Image Binarized Image I have applied Discrete Cosine Transform to the two images by dividing the 256x256 image into 8x8 blocks. After, I want to compare their DCT Coefficient Distributions. import matplotlib.mlab as…
alyssaeliyah
  • 2,214
  • 6
  • 33
  • 80
2
votes
0 answers

How to apply a sinc low-pass filter onto an RGB Image in Python?

The documentation of OpenCV demonstrates how you can perform an discrete fourier transform, apply an LPF mask and then perform an inverse DFT. The following code does this: import numpy as np import cv2 from matplotlib import pyplot as plt img =…
2
votes
2 answers

Calculating the DFT with Jtransform's DoubleFFT_1D() for android

I have been searching everywhere to find a reliable method to calculate the FFT of an audio byte stream received by a native function in android SDK (through eclipse IDE). I have come across the libgdx fft and Jtransform. Jtransform Found…
digiphd
  • 2,319
  • 3
  • 23
  • 22
2
votes
0 answers

fftwf_plan_dft_1d( ... ) with FFTW fails to be executed

The fftwf_plan_dft_1d(...) line of the following function fails in Ubuntu. It is used for doing FFT on a complex vectors of a length of about 4096 numbers. Please help. TIA This is C code compiled and run in Ubuntu 18.04. There is no issue of…
Shu
  • 21
  • 3
2
votes
1 answer

How come when I zero-pad a signal the fft's of the orignal signal and the zero padded signal are no longer concatenated around the same point?

I think i'm implementing the code wrong. I thoughts that the original and zero padded signal would be concatenated around the same point, with the same peaks. Is my understanding of this wrong or is my code the issue? clc;clear; N=257; %number of…
2
votes
1 answer

Applying FFT on multiplication of two very large number without using recursion

I have recently learned the FFT algorithm. I applied it to the problem of fast multiplication of very large natural number following this pseudocode, Let A be array of length m, w be primitive m-th root of unity. Goal: produce DFT F(A): evaluation…
Sung-IL
  • 73
  • 6
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

Poisson equation solver in 3-D Sine transform of r2r type using FFTW in Fortran

I have written following code in Fortran to solve Poisson's equation using r2r (real to real) type FFTW sin transform. In this code, first I have done normal FFTW i.e. r2c (real to complex) type of a mathematical function 27*sin(3x)*sin(3y)*sin(3z)…
2
votes
1 answer

Unexpected FFT Results with Python

I'm analyzing what is essentially a respiratory waveform, constructed in 3 different shapes (the data originates from MRI, so multiple echo times were used; see here if you'd like some quick background). Here are a couple of segments of two of the…
bearplane
  • 700
  • 1
  • 9
  • 22
2
votes
2 answers

Why is my discrete time Fourier transform incorrect?

I created a code that tries to compute the DTFT of a function. This is my code: figure n = linspace(0,2*pi,1500); %example x = cos(n); %example l = length(n); syms k w Xk = sum(x(1:l).*exp((-1i.*k.*2/l.*pi.*(0:l-1)))); Xk = matlabFunction(Xk); d =…
omersk3
  • 23
  • 4
2
votes
0 answers

Discrete Fourier Transform using scipy.fftpack

I have a question regarding the scipy.fft package, and how I can use this to generate a Fourier transform of a pulse. I am trying to do this for an arbitrary pulse in the future, but I wanted to make it as simple as possible so I have been…
2
votes
1 answer

Can anyone help with this Stack/List problem?

I've been working through a book on java, and have to represent a directed graph, distances between nodes etc. Here's what i have (from previous publications) import java.io.*; import java.util.*; public class BFSAlgorithm { private Graph…
Chris Edwards
  • 3,514
  • 2
  • 33
  • 40
2
votes
1 answer

Not getting the desired FFT for sigma-delta modulator

I have a second order sigma delta modulator in simulink matlab. it's working fine i applied a sinusoidal waveform to the input with Vp - p = 1V and i have the same waveform(with a little delay), after low-pass filtering in the output : I get this…
Fateme
  • 21
  • 3
2
votes
1 answer

Calculate frequency bins of an audiosignal

I am doing a fft (stft) on a audio-file, which contains voice and music. I took out a range of 1-200 from signal, which i saved in a variable called, for example, frequency_band1. How can i calculate the frequency bins from variable, which stores my…
2
votes
1 answer

Understanding Formants from Audio Signal

I went through the Matlab tutorial on Formant Estimation using LPC Coefficients. Though I vaguely understand the details, it's not entirely clear why we need to do this. From http://person2.sol.lu.se/SidneyWood/praate/whatform.html: A formant is a…
Sean
  • 445
  • 1
  • 5
  • 10