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

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


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

circuit :: ([[Int]],[[Double]]) 
            -> [([[Int]], Double)]
circuit z0 =  
                   (res1 1 5 3 100.0 z0) ++    
                   (res1 2 1 2 100.0 z0) ++    
                   (res1 3 2 0 100.0 z0) ++    
                   (res1 4 4 0 10.0 z0) ++   
                   (res1 5 0 5 100.0 z0) ++ 
                   (vdc1 6 1 0 2.0 z0) ++    
                   (vcvs1 7 3 0 2 0 1.0 z0) ++    
                   (vccs1 8 4 0 5 0 1.0 z0)     

--main = circuit ([mOP],[]) [] []     
main = opPrint (dcOP [] [] circuit)
{-
array (1,8) [(1,2.0),(2,1.0),(3,1.0),(4,-5.0),(5,0.5),(6,-0.01),(7,0.5),(8,0.005)]

-}

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].