Beramos / DS-Julia2925

Julia2925: learn a fast and intuitive programming language in two workdays.
https://beramos.github.io/DS-Julia2925
BSD 3-Clause "New" or "Revised" License
16 stars 8 forks source link

03 exercises fix seed #139

Closed DaanVanHauwermeiren closed 7 months ago

DaanVanHauwermeiren commented 1 year 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

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