Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- import numpy as np
- arraySize = 10
- arrayPrecision = 0.1
- array = []
- x = 0
- f_x = x
- def arrayMaker():
- global x
- global f_x
- for n in np.arange(-arraySize/2, 0, arrayPrecision):
- x = n
- array.append(f_x)
- for n in np.arange(0, (arraySize/2)+0.1, arrayPrecision):
- x = n
- array.append(f_x)
- print(array)
Add Comment
Please, Sign In to add comment