drone-rigide/utils/measure_freq.jl
2019-06-02 18:02:15 +02:00

19 lines
399 B
Julia

using Statistics
using CSV
file_measure = "walk.csv"
measure = CSV.read(file_measure, header=false) |> Matrix{Float64}
deltas = measure[2:end,1] - measure[1:end-1,1]
print("Fréquence moyenne :\t")
print(1/(Statistics.mean(deltas)))
println(" Hz")
print("Delta moyen :\t\t")
print(Statistics.mean(deltas))
println(" s")
print("Écart type :\t\t")
print((Statistics.std(deltas)))
println(" s");