In [1]:
from lcapy import Circuit
cct = Circuit("""
V1 1 0 {u(t)}; down
R1 1 2 4; right=2
R2 2 3 6; down=2
W1 0 3; right
""")
cct.draw()
In [2]:
cct[2].v
Out[2]:
In [3]:
%matplotlib inline
ax = cct[2].v.plot()
In [4]:
ax = cct.R1.i.plot()