4,493
edits
m (Text replacement - "http://help.dyalog.com" to "https://help.dyalog.com") |
m (Text replacement - "</source>" to "</syntaxhighlight>") Tags: Mobile edit Mobile web edit |
||
Line 1: | Line 1: | ||
{{Built-in|Table|⍪}}, or '''Ravel Items''', is a [[monadic]] [[primitive function]] which returns a [[matrix]] formed by applying [[Ravel]] to each [[major cell]] of the given array. Table shares its [[glyph]] <source lang=apl inline>⍪</ | {{Built-in|Table|⍪}}, or '''Ravel Items''', is a [[monadic]] [[primitive function]] which returns a [[matrix]] formed by applying [[Ravel]] to each [[major cell]] of the given array. Table shares its [[glyph]] <source lang=apl inline>⍪</syntaxhighlight> with the dyadic function [[catenate|Catenate First]]. | ||
== Examples == | == Examples == | ||
Line 25: | Line 25: | ||
│MNOPQRSTUVWX│ │ | │MNOPQRSTUVWX│ │ | ||
└────────────┴────┘ | └────────────┴────┘ | ||
</ | </syntaxhighlight> | ||
A [[scalar]] [[argument]] is converted to a 1-by-1 matrix: | A [[scalar]] [[argument]] is converted to a 1-by-1 matrix: | ||
Line 34: | Line 34: | ||
│123│1 1│ | │123│1 1│ | ||
└───┴───┘ | └───┴───┘ | ||
</ | </syntaxhighlight> | ||
== Properties == | == Properties == | ||
Line 51: | Line 51: | ||
ABCDEFGHIJKLMNOPQRSTUVWX | ABCDEFGHIJKLMNOPQRSTUVWX | ||
YZABCDEFGHIJKLMNOPQRSTUV | YZABCDEFGHIJKLMNOPQRSTUV | ||
</ | </syntaxhighlight> | ||
In languages where the [[Rank (operator)|Rank operator]] is available, Table is equivalent to <source lang=apl inline>,⍤¯1</ | In languages where the [[Rank (operator)|Rank operator]] is available, Table is equivalent to <source lang=apl inline>,⍤¯1</syntaxhighlight>: | ||
<source lang=apl> | <source lang=apl> | ||
(,⍤¯1)2 3 4 2⍴⎕A | (,⍤¯1)2 3 4 2⍴⎕A | ||
ABCDEFGHIJKLMNOPQRSTUVWX | ABCDEFGHIJKLMNOPQRSTUVWX | ||
YZABCDEFGHIJKLMNOPQRSTUV | YZABCDEFGHIJKLMNOPQRSTUV | ||
</ | </syntaxhighlight> | ||
In languages where [[function axis]] is available, Table is equivalent to <source lang=apl inline>,[1↓⍳≢⍴Y]</ | In languages where [[function axis]] is available, Table is equivalent to <source lang=apl inline>,[1↓⍳≢⍴Y]</syntaxhighlight>: | ||
<source lang=apl> | <source lang=apl> | ||
{,[1↓⍳≢⍴⍵]⍵}2 3 4 2⍴⎕A | {,[1↓⍳≢⍴⍵]⍵}2 3 4 2⍴⎕A | ||
ABCDEFGHIJKLMNOPQRSTUVWX | ABCDEFGHIJKLMNOPQRSTUVWX | ||
YZABCDEFGHIJKLMNOPQRSTUV | YZABCDEFGHIJKLMNOPQRSTUV | ||
</ | </syntaxhighlight> | ||
== External links == | == External links == |