Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Find a submatrix in an array matching a pattern
ResourceFunction["FindSubmatrix"][array,pattern] finds a submatrix in the array matching pattern. |
“Matrix" | the submatrix that matches the pattern |
"Positions" | the position where the submatrix starts |
"Image3D" | an image showing the position of the submatrix |
"Cuboids" | cuboids at the position of the submatrices |
"Raster" | a raster showing the position of the submatrix |
Generate an array:
In[1]:= | ![]() |
Out[1]= | ![]() |
Find a submatrix matching the pattern:
In[2]:= | ![]() |
Out[2]= | ![]() |
The position where the submatrix starts:
In[3]:= | ![]() |
Out[3]= | ![]() |
A raster showing the location of the submatrix:
In[4]:= | ![]() |
Out[4]= | ![]() |
A tridimensional array:
In[5]:= | ![]() |
Find a definite array:
In[6]:= | ![]() |
Out[6]= | ![]() |
In[7]:= | ![]() |
Out[7]= | ![]() |
Cuboids showing the location of submatrices:
In[8]:= | ![]() |
Out[8]= | ![]() |
A 3D image showing the location of the submatrix:
In[9]:= | ![]() |
Out[9]= | ![]() |
In[10]:= | ![]() |
Out[10]= | ![]() |
A SparseArray:
In[11]:= | ![]() |
Out[11]= | ![]() |
In[12]:= | ![]() |
Out[12]= | ![]() |
In[13]:= | ![]() |
Out[13]= | ![]() |
A 4–dimensional SparseArray:
In[14]:= | ![]() |
Out[14]= | ![]() |
In[15]:= | ![]() |
Out[15]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License