Skip to main content

Eye

This function creates an indentity matrix.

Calling example:

amat = Eye(m, DataType)
  • m is the size of matrix
  • DataType is the data type of returned matrix. DataType can be
    • 1.0_Real32
    • 1.0_Real64
    • 1_Int8
    • 1_Int16
    • 1_Int32
    • 1_Int64

Interface

MODULE PURE FUNCTION Eye(m, DataType) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: m
Int8| Int16| Int32 | Int64 | Real32 | Real64, INTENT(IN) :: DataType
Int8| Int16| Int32 | Int64 | Real32 | Real64 :: ans(m, m)
END FUNCTION Eye