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

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


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

import Array

circuit :: ESim -> [Device]      
circuit z0 = (npn1 1 2 3 0 z0) ++
             (res1 2 1 2 1000.0 z0) ++
             (res1 3 3 4 1000.0 z0) ++
             (vsrc2 4 1 0 15.0 z0) ++
             (vsrc2a 5 4 0 0.25 60 z0) ++
             (res1 6 2 3 100000.0 z0)     
 

                       
m = opvalue (dcOP1 [] [] circuit)  
n = dcOP1 [] [] circuit 
tr = dcTran1 (1/(60*8)) (2/60) m m circuit 

 
main = trPrint [1,2,4,5] tr


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.