rStats.js v1.3.0
    Preparing search index...

    Function norm

    • Matrix norm. Equivalent to R's norm().

      Returns NaN if the matrix contains NaN. For type: "2", an infinite element is an error.

      Parameters

      Returns number

      The norm of x.

      norm([[1, -2], [3, 4]]);                // 6 (one norm)
      norm([[1, -2], [3, 4]], { type: "I" }); // 7
      norm([[1, -2], [3, 4]], { type: "F" }); // 5.477225575051661