4 lines
136 B
Ruby
4 lines
136 B
Ruby
|
|
require 'matrix'
|
||
|
|
p Matrix.identity(5)
|
||
|
|
# => Matrix[[1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 1]]
|