Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Add row and column dividing lines to MatrixForm
ResourceFunction["MatrixFormDivided"][m,step] returns a MatrixForm of matrix m with divider lines every step columns and rows. | |
ResourceFunction["MatrixFormDivided"][m,{xstep,ystep}] use different step specifications for colums and rows. | |
ResourceFunction["MatrixFormDivided"][m,{{s1,s2,…,sn}}] uses divider lines with specified sizes s where each si represents a number of columns and rows. | |
ResourceFunction["MatrixFormDivided"][m,{{sx1,sx2,…,sxn},{sy1,sy2,…,syn}}] uses diferent divider lines specific spacings for rows and columns. | |
ResourceFunction["MatrixFormDivided"][spec] represents an operator form of ResourceFunction["MatrixFormDivided"] that can be applied to a matrix. |
Place divider lines at every second column and row:
In[1]:= | ![]() |
Out[1]= | ![]() |
Place divider lines at every third column and row:
In[2]:= | ![]() |
Out[2]= | ![]() |
Use the operator form on a rectangular matrix:
In[3]:= | ![]() |
Out[3]= | ![]() |
In[4]:= | ![]() |
Out[4]= | ![]() |
Using copy/paste or evaluate in place, it is possible to use MatrixFormDivided as part of input. This cannot be done with a Grid:
In[5]:= | ![]() |
Out[5]= | ![]() |
The structure of composed matrices can be highlighted by using divider lines:
In[6]:= | ![]() |
Out[7]= | ![]() |
In[8]:= | ![]() |
Out[8]= | ![]() |
Use dividers at specific locations:
In[9]:= | ![]() |
Out[9]= | ![]() |
Use dividers at specific locations differently for rows and columns:
In[10]:= | ![]() |
Out[10]= | ![]() |
Place dividers for every two rows or columns, with an offset of one:
In[11]:= | ![]() |
Out[11]= | ![]() |
Use an offset of one only on the rows:
In[12]:= | ![]() |
Out[12]= | ![]() |
Use an offset of one only on the columns:
In[13]:= | ![]() |
Out[13]= | ![]() |
MatrixFormDivided is an extended version of MatrixForm:
In[14]:= | ![]() |
Out[14]= | ![]() |
In[15]:= | ![]() |
Out[15]= | ![]() |
The output of MatrixFormDivided is not directly computable:
In[16]:= | ![]() |
Out[16]= | ![]() |
By evaluating it in place, it becomes computable:
In[17]:= | ![]() |
Out[17]= | ![]() |
The "DividersOffset" option has no effect when using specific spacings:
In[18]:= | ![]() |
Out[18]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License