Chalkboard - v3.0.1
    Preparing search index...

    Function init

    • Initializes a new matrix.

      Parameters

      • ...matrix: number[][] | number[][][]

        Either a sequence of 1D arrays to be used as rows for the matrix or one 2D array to be used as the matrix

      Returns ChalkboardMatrix

      // Defines a 3x3 matrix [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
      let A = Chalkboard.matr.init([1, 2, 3],
      [4, 5, 6],
      [7, 8, 9]);
      let B = Chalkboard.matr.init([[1, 2, 3],
      [4, 5, 6],
      [7, 8, 9]]);