迪里克
的狄利克雷函数或基数正弦的周期函数。
库::`工程师`
例子:
Dirichlet函数
Details
让我们计算和绘制之间的Dirichlet函数 和 为 和 . 该功能有一个周期 对于奇数 和 对于偶数 .
import EngeeDSP.Functions: diric
x = range(-2π, 2π, length=301)
d7 = diric.(x, 7)
d8 = diric.(x, 8)
plot(layout = (2, 1))
plot!(x/π, d7, subplot = 1)
ylabel!("N = 7", subplot = 1)
title!("Dirichlet Function", subplot = 1)
plot!(x/π, d8, subplot = 2)
ylabel!("N = 8", subplot = 2)
xlabel!("x / π", subplot = 2)
