Closed DaanVanHauwermeiren closed 7 months ago
we need to fix the seed in
noisy_signal(tᵢ; σ=10) = 5tᵢ + 5sin(tᵢ) + σ * rand();
because otherwise for m=1, this function will plot 2 different things, where they should be the same
m=1
begin t = 0:0.01:10 plot(t, noisy_signal.(t), label="Noisy", ylabel="Signal (-)", xlabel="time(s)") plot!(t, moving_average(noisy_signal, t, wₑ), label="Filtered", lw = 2) end
we need to fix the seed in
because otherwise for
m=1
, this function will plot 2 different things, where they should be the same