--------------------------------------------------------------------------------
import AC
import Circuit
circuit :: [([Int], [Double])]
circuit = [ res 1 2 1000.0,
res 2 0 1000.0,
res 1 0 1000.0,
cap 2 0 0.00001,
vac 1 0 1.0
]
main = acCalc circuit [1000.0]
{-
array (1,3) [(1,1.0 :+ 0.0),(2,0.000506093138653273 :+ (-0.0158993848642532)),(3,(-0.00199949390686135) :+ (-1.58993848642532e-05))]
-}
|