Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 465 Bytes

README.md

File metadata and controls

22 lines (15 loc) · 465 Bytes

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!