peroxide::util::non_macro

Function linspace

Source
pub fn linspace<S, T>(start: S, end: T, length: usize) -> Vec<f64>
where S: Into<f64> + Copy, T: Into<f64> + Copy,
Expand description

MATLAB like linspace

ยงExamples

use peroxide::fuga::*;

let a = linspace(1, 10, 10);
assert_eq!(a, seq(1,10,1));
assert_eq!(a.len(), 10);