drone-rigide/utils/measure_freq.jl

20 lines
399 B
Julia
Raw Normal View History

2019-06-02 16:02:15 +00:00
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");