fft

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Analyze added in v0.2.0

func Analyze(
	srate float64, floatVals []float64, scaling transform.Scaling) *freqresponse.FreqResponse

Analyze runs transform.AnalyzeTimeFreqTransform with the FFT transform. Before running the FFT, the float values will be converted to complex numbers and then padded with zeros to make radix-2 length.

func BitReverse

func BitReverse(val uint64, nBits int) (uint64, error)

func EnsurePowerOfTwoSize

func EnsurePowerOfTwoSize(vals []complex128) ([]complex128, int)

func FFT

func FFT(vals []complex128, scaling transform.Scaling) ([]complex128, error)

FFT is a radix-2 FFT transform using decimation-in-time. Can be used for both forward (anaysis) and inverse (synthesis) transform by selecting appropriate scaling. Returns non-nil error if input size is not an exact power of two. EnsurePowerOfTwoSize can be used before forward FFT to make power of two size by padding with zeros. Ported from unlicensed MATLAB code which was posted to the MathWorks file exchange by Dinesh Dileep Gaurav. See http://www.mathworks.com/matlabcentral/fileexchange/17778.

func ReverseString

func ReverseString(s string) string

ReverseString returns its argument string reversed rune-wise left to right.

Types

This section is empty.

Jump to

Keyboard shortcuts

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