sdr-0.1.0.12: 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

Root raised cosine

srrc Source #

Arguments

:: (Ord a, Floating a) 
=> Int

size: from [-n .. n]

-> Int

sampling period

-> a

beta

-> [a] 

Square root raised cosine

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 

Compute a windowed sinc function

Frequency Response Plot

plotFrequency Source #

Arguments

:: [Double]

The filter coefficients

-> FilePath

The filename

-> IO () 

Given filter coefficients, plot their frequency response and save the graph as a png file