Sunday, September 22, 2024
Google search engine
HomeLanguagesscipy.fftfreq() in Python

scipy.fftfreq() in Python

With the help of scipy.fftfreq() method, we can compute the fast fourier transformation frequency and return the transformed array by using this method.

Syntax : scipy.fftfreq(n, freq)

Return : Return the transformed  array.

Example #1 :

In this example we can see that by using scipy.fftfreq() method, we are able to compute the fast fourier transformation frequency and return the transformed array.

Python3




# import scipy and numpy
import scipy
import numpy as np
  
# Using scipy.fftfreq() method
gfg = scipy.fft.fftfreq(5, 1.096)
  
print(gfg)


Output :

[ 0.          0.18248175  0.3649635  -0.3649635  -0.18248175]

Example #2 :

Python3




# import scipy and numpy
import scipy
import numpy as np
  
# Using scipy.fftfreq() method
gfg = scipy.fft.fftfreq(3, 2.4096)
  
print(gfg)


Output :

[ 0.          0.13833555 -0.13833555]

Dominic Rubhabha-Wardslaus
Dominic Rubhabha-Wardslaushttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Recent Comments