pub fn zadoff_chu(u: u32, n_zc: u32) -> Result<Vec<C64>>Expand description
The Zadoff–Chu sequence $x_{u}(n) = e^{-j\pi u n (n + 1) / N_{\mathrm{ZC}}}$ of root u
and odd length n_zc (see the module).
§Errors
comnum_core::Error::Config for an even or zero length, or a root that is zero
modulo $N_{\mathrm{ZC}}$ or not prime to it.
§Examples
use comnum_math::sequences::zadoff_chu;
let x = zadoff_chu(29, 63)?;
// zero periodic autocorrelation at every nonzero lag
let r: comnum_math::C64 = (0..63).map(|n| x[n] * x[(n + 5) % 63].conj()).sum();
assert!(r.norm() < 1e-9);