Skip to content
Snippets Groups Projects
Commit 8ffe5c85 authored by Max Nyberg Carlsson's avatar Max Nyberg Carlsson
Browse files

Initial work on frequency method

parent af595f86
No related branches found
No related tags found
No related merge requests found
[deps]
DSP = "717857b8-e6f2-59f4-9121-6e50c889abd2"
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
FourierTools = "b18b359b-aebc-45ac-a139-9c0ccbb2871e"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
using Pkg; Pkg.activate(".");
using FFTW, DSP, Plots, DelimitedFiles
function plot_spectogram(s, n=div(length(s),8), noverlap=div(n,2))
spec = spectrogram(s, n, noverlap)
heatmap(spec.time, spec.freq, spec.power)
end
function read_data(dataname, gyro=false)
if !gyro
return readdlm("data/$(dataname)_acc.txt", Float64)
else
return (readdlm("data/$(dataname)_acc.txt", Float64),
readdlm("data/$(dataname)_gyr.txt", Float64))
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment