Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Convert the size, index and base into an integer array pattern
ResourceFunction["ArrayPatternFromIndex"][{size,index,b}] creates an array of the given size using the digits of index in base b. |
Convert size, index and base 2 into a binary array:
In[1]:= | ![]() |
Out[1]= | ![]() |
Convert size, index and base 3 into a ternary array:
In[2]:= | ![]() |
Out[2]= | ![]() |
The resource function ArrayPatternToIndex is the inverse of ArrayPatternFromIndex:
In[3]:= | ![]() |
Out[3]= | ![]() |
In[4]:= | ![]() |
Out[4]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License