Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 479 Bytes

matrices.md

File metadata and controls

40 lines (30 loc) · 479 Bytes

matrix-specific features

rows and cols

const A = new Matrix([
    [1, 2, 3], 
    [4, 5, 6], 
]);

const r = A.rows();
// r is 2
const c = A.cols();
// c is 3

dimension

const A = new Matrix([
    [1, 2, 3], 
    [4, 5, 6], 
]);

const dimension = A.dim();
// dimension is [2, 3]

transpose

const A = new Matrix([
    [1, 2, 3], 
    [4, 5, 6], 
]);

const B = A.transpose();
// B is [[1, 4], [2, 5], [3, 6]]