Function peroxide::complex::matrix::cmatrix

source ·
pub fn cmatrix<T>(v: Vec<T>, r: usize, c: usize, shape: Shape) -> ComplexMatrix
where T: Into<C64>,
Expand description

R-like complex matrix constructor

§Examples

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

fn main() {
    let a = cmatrix(vec![C64::new(1f64, 1f64),
                      C64::new(2f64, 2f64),
                      C64::new(3f64, 3f64),
                      C64::new(4f64, 4f64)],
                   2, 2, Row
    );
    a.col.print(); // Print matrix column
}