Skip to content
Permalink
87ae42c3da
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
39 lines (32 sloc) 755 Bytes
require 'csv'
base = CSV.read("base.csv")
sensor_names = base.shift
precision = base.shift
base_data = base.shift
#puts sensor_names
#puts precision
#puts base_data
ITERATIONS = 1000
#def vary_data(base_data)
# new_data = []
# new_data[0] = base_data[0]
# new_data[1] = base_data[1] * Random.rand(2)
# new_data[2] = base_data[2]
# new_data[3] = base_data[3] * Random.rand(5)
# new_data[4] = base_data[4]
# new_data[5] = base_data[5] * Random.rand(2)
# new_data[6] = base_data[6] * Random.rand(2)
# new_data[7] = base_data[7] * Random.rand(2)
#
# puts new_data
#
# new_data
#end
# Start outputting the csv
CSV.open("normal.csv", "wb") do |c|
# c << vary_data(base_data)
t = base_data
t[0] = i
c << t
end
c