author | Puneeth Chaganti <punchagan@fossee.in> |
Fri, 27 May 2011 14:24:59 +0530 | |
changeset 0 | 0efde00f9229 |
permissions | -rw-r--r-- |
0 | 1 |
#!/usr/bin/python |
2 |
## 2.3 |
|
3 |
||
4 |
import os, sys |
|
5 |
curdir = os.getcwdu() |
|
6 |
n = curdir.rfind("/") |
|
7 |
curdir[:n]+"/python" |
|
8 |
sys.path += [curdir[:n]+"/python"] |
|
9 |
||
10 |
import scipy as sp |
|
11 |
from scipy import signal |
|
12 |
from scipy import linalg |
|
13 |
||
14 |
from dscr import dscr |
|
15 |
||
16 |
||
17 |
F = sp.array([[-1,0],[1,0]]) |
|
18 |
G = sp.array([[1],[0]]) |
|
19 |
C = sp.array([0,1]) |
|
20 |
D = 0 |
|
21 |
Ts = 1 |
|
22 |
H = signal.lti(F, G, C, D) |
|
23 |
||
24 |
h = dscr(H, Ts) |
|
25 |
print h.A, h.B, h.C, h.D, Ts |