1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/// Construct a [`Matrix`](crate::Matrix) using MATLAB-like syntax.
///
/// Rows are separated by semicolons, elements by commas.
///
/// ```
/// use numeris::matrix;
///
/// // 2×3 matrix
/// let m = matrix![1.0, 2.0, 3.0; 4.0, 5.0, 6.0];
/// assert_eq!(m[(0, 0)], 1.0);
/// assert_eq!(m[(1, 2)], 6.0);
///
/// // 1×1 matrix
/// let s = matrix![42.0];
/// assert_eq!(s[(0, 0)], 42.0);
/// ```
;
}
/// Construct a row [`Vector`](crate::Vector) (1×N matrix).
///
/// ```
/// use numeris::vector;
///
/// let v = vector![1.0, 2.0, 3.0];
/// assert_eq!(v[0], 1.0);
/// assert_eq!(v[2], 3.0);
/// ```