analysis

package
v0.0.0-...-cabcf74 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FFTShiftF

func FFTShiftF(buffer []float64) []float64

FFTShiftF shifts a buffer of floats. The passed buffer is modified. See http://www.mathworks.com/help/matlab/ref/fftshift.html

Types

type DFT

type DFT struct {
	Bins       []complex128
	SampleRate int
	// contains filtered or unexported fields
}

DFT is the Discrete Fourier Transform representation of a signal https://en.wikipedia.org/wiki/Discrete_Fourier_transform

func NewDFT

func NewDFT(sr int, x []float64) *DFT

NewDFT returns the FFT result wrapped in a DFT struct

func (*DFT) BinWidth

func (d *DFT) BinWidth() int

BinWidth is the width of a bin (in frequency). It is calculate by using the Nyquist frequency (sample rate/2) divided by the DFT size.

func (*DFT) IFFT

func (d *DFT) IFFT() []float64

IFFT runs an inverse fast fourrier transform and returns the float values

func (*DFT) ToFreqRange

func (d *DFT) ToFreqRange() map[int]float64

ToFreqRange returns a map with the frequency and their values (normalized)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL