peroxide

Macro linspace

Source
macro_rules! linspace {
    ( $start:expr, $end:expr, $length: expr) => { ... };
    ( $start:expr, $end:expr ) => { ... };
}
Expand description

MATLAB like linspace

ยงExamples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = linspace!(1, 10, 10);
    assert_eq!(a, seq!(1,10,1));
}
#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = linspace!(10, 1000);
    assert_eq!(a, seq!(10,1000,10));
}