Documentation ¶
Index ¶
- func Analyze(srate float64, floatVals []float64, scaling transform.Scaling) *freqresponse.FreqResponse
- func BitReverse(val uint64, nBits int) (uint64, error)
- func EnsurePowerOfTwoSize(vals []complex128) ([]complex128, int)
- func FFT(vals []complex128, scaling transform.Scaling) ([]complex128, error)
- func ReverseString(s string) string
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 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 ¶
ReverseString returns its argument string reversed rune-wise left to right.
Types ¶
This section is empty.