remove redundant includes
[liba.git] / python / test / tf.py
blobfda124ccffba697d74f6da530829120906ad0864
1 #!/usr/bin/env python
2 import os, sys
4 base = os.path.dirname(__file__)
5 path = os.path.dirname(base)
6 sys.path.insert(0, path)
7 if len(sys.argv) > 1:
8 sys.stdout = open(sys.argv[1], "w")
10 import liba # type: ignore
12 num = [6.59492796e-05, 6.54019884e-05]
13 den = [1.0, -1.97530991, 0.97530991]
15 tf = liba.tf(num, den[1:])
17 N = 1000
18 T = 0.5 / N
19 x = [0.0] * N
20 for i in range(N):
21 x[i] = i * T
23 y = [0.0] * N
24 for i in range(N):
25 y[i] = tf(x[i])
27 for i in range(N):
28 print("%g,%g" % (x[i], y[i]))
30 tf.num = tf.num
31 tf.den = tf.den
32 tf.input
33 tf.output