Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- transferFunction:: Int -> Number.Ratio.T (MathObj.Polynomial.T Double)
- transferFunction n = const 1 % polynome where
- polynome = const alpha * p1^r * foldl (*) (const 1) (map p2 [1..l])
- p1 = fromCoeffs [alpha, 1]
- p2 n' = fromCoeffs [alpha^^2, 2 * alpha * sin(thetta n'), 1]
- thetta n' = (2 * fromIntegral n' - 1) / (2 * fromIntegral n) * pi
- alpha = fromdB attPass ** (- fromIntegral n)
- (l,r) = divMod n 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement