Advertisement
Guest User

Untitled

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