<eye> ( m n k z -- matrix )
Matrix operations

Prev:<simple-eye> ( m n k -- matrix )
Next:<coordinate-matrix> ( dim -- coordinates )


Vocabulary
math.matrices

Inputs
man integer
nan integer
kan integer
zan object


Outputs
matrixa matrix


Word description
Creates an m x n matrix with a diagonal of z offset by k from the main diagonal. A positive value of k gives a diagonal above the main diagonal, whereas a negative value of k gives a diagonal below the main diagonal.

Examples
USING: math.matrices prettyprint ; 5 6 0 4 <eye> .
{ { 4 0 0 0 0 0 } { 0 4 0 0 0 0 } { 0 0 4 0 0 0 } { 0 0 0 4 0 0 } { 0 0 0 0 4 0 } }


USING: math.matrices prettyprint ; 5 5 2 2 <eye> .
{ { 0 0 2 0 0 } { 0 0 0 2 0 } { 0 0 0 0 2 } { 0 0 0 0 0 } { 0 0 0 0 0 } }


Definition