[−][src]Function statrs::generate::sinusoidal
pub fn sinusoidal(
length: usize,
sampling_rate: f64,
frequency: f64,
amplitude: f64
) -> Vec<f64>
Deprecated since 0.8.0:
please use Sinusoidal::default
instead
Creates a vector of f64
points representing a Sine wave with a mean of
0.0
, phase of 0.0
, and delay of 0
.
Examples
use statrs::generate; let x = generate::sinusoidal(10, 8.0, 2.0, 1.0); assert_eq!(x, [0.0, 1.0, 0.00000000000000012246467991473532, -1.0, -0.00000000000000024492935982947064, 1.0, 0.00000000000000036739403974420594, -1.0, -0.0000000000000004898587196589413, 1.0]);