Plan 9 from Bell Labs’s /usr/web/sources/contrib/fernan/escomma/examples/ex6.hs

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


--------------------------------------------------------------------------------
import DC
import Circuit

circuit :: [([Int], [Double])]
circuit = [ 
            res 1 2 100.0,
            res 2 0 100.0,
            res 3 0 1000.0,
            vdc 1 0 5.0,
            vccs 3 0 2 0 10.0
           ] 

main = dcCalc $ circuit
{-
array (1,5) [(1,5.0),(2,2.5),(3,-25000.0),(4,-0.025),(5,25.0)]

-}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].