tra-analysis/generate_data.py
2018-11-14 15:48:49 -06:00

17 lines
337 B
Python

import random
def generate(filename, x, y, low, high):
file = open(filename, "w")
for i in range (0, y, 1):
temp = ""
for j in range (0, x - 1, 1):
temp = str(random.uniform(low, high)) + "," + temp
temp = temp + str(random.uniform(low, high))
file.write(temp + "\n")