File:Leakyintegrator.png

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Summary

[edit | edit source]

Leaky Integrator graph, made with PyLab.

Self-made.


from pylab import *

ans = []
A = 1
deltaT = .5
x=0

for J in range(0, 20):
    if 0 < J <= 5:
        I = 5
    else:
        I = 0
    x += (-1 * A * x + I) * deltaT         ## x(t+delta t) = x(t) + (-Ax+I) * delta T
    ans.append(x)
plot(ans)
grid(True)
show()

Licensing:

[edit | edit source]

The following page uses this file: