fork download
  1. Rv = 1000
  2. R1 = 100
  3. C1 = 0.000000001
  4. R2 = 100
  5. L1 = 1000
  6. R3 = 10000
  7. U = 1/10
  8.  
  9.  
  10. C = np.asarray([[C1, 0, 0], [0, 0, 0], [0, 0, 0]])
  11. L = np.asarray([[0, 0, 0], [0, 1/L1, -1/L1], [0, -1/L1, 1/L1]])
  12. G = np.asarray([[1/Rv + 1/R1, -1/R1, 0], [-1/R1, 1/R1 + 1/R2, 0], [0, 0, 1/R3]])
  13. CL = np.asarray([[C1, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, -1/L1]])
  14. GL = np.asarray([[1/Rv + 1/R1, -1/R1, 0, 0], [-1/R1, 1/R1 + 1/R2, 0, 1], [0, 0, 1/R3, -1], [0, 1, -1, 0]])
  15. vectorE = np.asarray([[Rv*U, 0, 0]])
  16. vectorE1 = np.asarray([[Rv*U, 0, 0, 0]])
  17. w = 1
  18. p = np.sqrt(-1+0j) * w
  19. A1 = C*p + G + (1/p) * L
  20. A2 = CL*p + GL
  21.  
  22. a_list = np.hsplit(A1,3)
  23. cram_list = [a_list, vectorE.T]
  24. print(cram_list[0][0])
  25. Xn = np.hstack((cram_list[-1], cram_list[0][1], cram_list[0][2]))
Runtime error #stdin #stdout #stderr 0.02s 9984KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 10, in <module>
NameError: name 'np' is not defined