Advertisement
Guest User

Untitled

a guest
May 28th, 2015
338
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. import numpy as np
  2. x=[2,4,6,1,6,7]
  3. np.diff(x)
  4. np.exp(x)
  5. np.log(x)
  6.  
  7. a=3
  8. b=5
  9. np.mod(a,b)
  10.  
  11. import matplotlib.pyplot as plt
  12. plt.ion()
  13.  
  14. a=4.0+3.5j
  15. plt.plot([0.0,np.real(a)],[0.0,np.imag(a)])
  16. print abs(a)
  17. np.angle(a)
  18.  
  19. import numpy as np
  20. import matplotlib.pyplot as plt
  21. plt.ion()
  22.  
  23. a=4.0+3.5j
  24. plt.plot([0.0,np.real(a)],[0.0,np.imag(a)])
  25. print abs(a)
  26. print np.angle(a)
  27. print np.angle(a,deg=0)
  28. print np.angle(a,deg=1)
  29. print np.degrees(np.angle(a))
  30. print np.arctan(np.imag(a)/np.real(a))
  31.  
  32. x=np.arange(-4,5,0.1)
  33. y=x**4+np.log(2)-np.sqrt(2.5)
  34. plt.plot(x,y,'.',color='green')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement