Function statrs::generate::periodic [] [src]

pub fn periodic(length: usize, sampling_rate: f64, frequency: f64) -> Vec<f64>

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]);