[−][src]Function statrs::generate::periodic
pub fn periodic(length: usize, sampling_rate: f64, frequency: f64) -> Vec<f64>
Deprecated since 0.8.0:
please use Periodic::default
instead
Creates a vector of f64
points representing a periodic wave with an
amplitude of 1.0
, phase of 0.0
, and delay of 0
.
Examples
use statrs::generate; let x = generate::periodic(10, 8.0, 2.0); assert_eq!(x, [0.0, 0.25, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.25]);