September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
13
Task/Identity-matrix/Phix/identity-matrix.phix
Normal file
13
Task/Identity-matrix/Phix/identity-matrix.phix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
function identity(integer n)
|
||||
sequence res = repeat(repeat(0,n),n)
|
||||
for i=1 to n do
|
||||
res[i][i] = 1
|
||||
end for
|
||||
return res
|
||||
end function
|
||||
|
||||
ppOpt({pp_Nest,1})
|
||||
pp(identity(3))
|
||||
pp(identity(5))
|
||||
pp(identity(7))
|
||||
pp(identity(9))
|
||||
Loading…
Add table
Add a link
Reference in a new issue