Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def analitStep((A, B, C, D), T):
- ss = StateSpace(A, B, C, D)
- T = arange(T[0], T[1], T[2])
- J, V = eig(A)
- J = mt(J * eye(3, 3))
- V = mt(V)
- y = ([], [])
- for i in range(len(T)):
- y[0].append(T[i])
- yy = C * V * mt(expm(J * T[i]) - eye(3, 3))* mt(inv(J)) * mt(inv(V)) * B
- y[1].append(array(yy[0])[0][0])
- plot(y[0], y[1])
- title('Analytical construction')
- xlabel('t, s.')
- ylabel('y(t)')
- grid(color='g', linestyle='--')
- show()
Advertisement
Add Comment
Please, Sign In to add comment