scalar(n, value) public

Creates an n by n diagonal matrix where each diagonal element is value.

  Matrix.scalar(2, 5)
    => 5 0
       0 5
Show source
Register or log in to add new notes.