Skip to content

Instantly share code, notes, and snippets.

@ivlis
Created December 17, 2013 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivlis/8307908363714d23716a to your computer and use it in GitHub Desktop.
Save ivlis/8307908363714d23716a to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import matplotlib.pyplot as plt
from numpy import vectorize, sqrt, linspace
R = 1
C = 0.2
w = 1
@vectorize
def impedance(l):
return sqrt(R**2 + (w*l - 1.0/(w*C))**2)
L = linspace(0.0001, 40.0, 200)
I = impedance(L)
plt.plot(L, I)
plt.xlabel('$L$')
plt.ylabel('$Z_\mathrm{eff}$')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment