View source: R/specta_data_processing.R
dispersion | R Documentation |
Compute the dispersion relation of waves Find k s.t. (2.pi.f)^2 = g.k.tanh(k.d)
dispersion(frequencies, depth, iter_max = 200, tol = 1e-06)
frequencies |
frequency vector |
depth |
depth (m) |
iter_max |
maximum number of iterations in the solver |
tol |
tolerance for termination. |
the wave numbers (same size as frequencies)
freq <- seq(from = 0, to = 1, length.out = 100)
k1 <- dispersion(freq, depth = 1)
k10 <- dispersion(freq, depth = 10)
kInf <- dispersion(freq, depth = Inf)
plot(freq, k1, type = "l")
lines(freq, k10, col = "red")
lines(freq, kInf, col = "green")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.