Skip to content

sbrbot/DFT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discrete Fourier Transform

This is a simple Discrete Fourier Transform library implemented in PHP.

require 'DFT.php';

// input discrete values
$Y=[2,3,-1,1];

// instantiate and calculate factors
$DFT=new DFT($Y);

// get Fourier (frquency domain) factors (Complex)
$Factors=$DFT->getFactors();

// get Magnitudes (absolute values) (float)
$Magnitudes=$DFT->getMagnitudes();

As simple as that!