sdr-0.1.0.3: A software defined radio library

Safe HaskellNone
LanguageHaskell2010

SDR.FilterDesign

Contents

Description

Filter design and plotting of frequency responses.

Synopsis

Sinc Function

sinc Source

Arguments

:: (Floating n, Vector v n) 
=> Int

The length. Must be odd.

-> n

The cutoff frequency (from 0 to 1)

-> v n 

Compute a sinc function

Windows

hanning Source

Arguments

:: (Floating n, Vector v n) 
=> Int

The length of the window

-> v n 

Compute a Hanning window.

hamming Source

Arguments

:: (Floating n, Vector v n) 
=> Int

The length of the window

-> v n 

Compute a Hamming window.

blackman Source

Arguments

:: (Floating n, Vector v n) 
=> Int

The length of the window

-> v n 

Compute a Blackman window.

Convenience Functions

windowedSinc Source

Arguments

:: (Floating n, Vector v n) 
=> Int

The length

-> n

The cutoff frequency (from 0 to 1)

-> (Int -> v n)

The window function

-> v n 

Frequency Response Plot

plotFrequency Source

Arguments

:: [Double]

The filter coefficients

-> IO () 

Given filter coefficients, plot their frequency response and save the graph as "frequency_response.png".