RosettaCodeData/Task/Matrix-multiplication/APL/matrix-multiplication.apl

11 lines
307 B
APL
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
x +.×
A A*¨A4 ⍝ Same A as in other examples (1 1 1 1⍪ 2 4 8 16⍪ 3 9 27 81,[0.5] 4 16 64 256)
B A ⍝ Matrix inverse of A
'F6.2' ⎕FMT A x B
1.00 0.00 0.00 0.00
0.00 1.00 0.00 0.00
0.00 0.00 1.00 0.00
0.00 0.00 0.00 1.00