Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
matrix_transpose [2016/10/02 15:26] nikolaj |
matrix_transpose [2016/10/02 15:45] nikolaj |
||
---|---|---|---|
Line 8: | Line 8: | ||
----- | ----- | ||
=== Discussion === | === Discussion === | ||
+ | == Code == | ||
<code> | <code> | ||
- | Transpose[{{a, b, c}, {x, y, z}}] | + | M = {{a, b, c}, {x, y, z}}; |
+ | TM = Transpose[M]; | ||
+ | |||
+ | M // MatrixForm | ||
+ | TM // MatrixForm | ||
</code> | </code> | ||
+ | |||
+ | <code/Haskell> | ||
+ | --$ idris -p contrib | ||
+ | import Data.Matrix | ||
+ | |||
+ | m : Matrix 3 2 Nat | ||
+ | m = [[3,5],[1,5],[2,1]] | ||
+ | |||
+ | tm : Matrix 2 3 Nat | ||
+ | tm = transpose m | ||
+ | <code/Haskell> | ||
=== Reference === | === Reference === |