FANDOM


(89) :list▶mat(list,Elements Per Row)

This turns a single list into a matrix by dividing the list into equal-length segments and then stacking them. If a list's elements are not divisible by the elementsPerRow, 0s are appended until the list's dimension is divisible.

This is the inverse of mat▶list(.

ExampleEdit

:{1,2,3,4,5,6}→L1
:list▶mat(L1,2)→M1
:Disp dim(M1         (displays {3,2})
:Disp M1             (displays [1,2]
                               [3,4]
                               [5,6])
:list▶mat(L1,4)→M2
:Disp dim(M2         (displays {2,4})
:Disp M2             (displays [1,2,3,4]
                               [5,6,0,0])

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.