Guest User

Untitled

a guest
Jan 16th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. import math
  2. import numpy as np
  3. arraySize = 10
  4. arrayPrecision = 0.1
  5. array = []
  6. x = 0
  7. f_x = x
  8.  
  9. def arrayMaker():
  10. global x
  11. global f_x
  12. for n in np.arange(-arraySize/2, 0, arrayPrecision):
  13. x = n
  14. array.append(f_x)
  15. for n in np.arange(0, (arraySize/2)+0.1, arrayPrecision):
  16. x = n
  17. array.append(f_x)
  18. print(array)
Add Comment
Please, Sign In to add comment