Matrix transposition: Difference between revisions

added Ursala
m (→‎{{header|AutoHotkey}}: Minor indentation and casing edit)
(added Ursala)
Line 681:
</pre>
 
=={{header|Ursala}}==
Matrices are stored as lists of lists, and transposing them is a built in operation.
<lang Ursala>
#cast %eLL
 
example =
 
~&K7 <
<1.,2.,3.,4.>,
<5.,6.,7.,8.>,
<9.,10.,11.,12.>></lang>
For a more verbose version, replace the ~&K7 operator with the standard library function
named transpose. Here is the output:
<pre>
<
<1.000000e+00,5.000000e+00,9.000000e+00>,
<2.000000e+00,6.000000e+00,1.000000e+01>,
<3.000000e+00,7.000000e+00,1.100000e+01>,
<4.000000e+00,8.000000e+00,1.200000e+01>>
</pre>
Anonymous user