|
Further Examples: MapThread
This applies BetaRegularized to a, b and c.
In[1]:= 
Out[1]= 
This does the same thing.
In[2]:= 
Out[2]= 
This threads BesselJ over the two lists that appear in its arguments.
In[3]:= 
Out[3]= 
This does the same thing.
In[4]:= 
Out[4]= 
Here is a nested list.
In[5]:= 
This applies a pure function of arguments to corresponding pairs of list elements at level .
In[6]:= 
Out[6]= 
This is the same thing.
In[7]:= 
Out[7]= 
Here the pure function is applied at level .
In[8]:= 
Out[8]= 
This applies each function in the first list to the respective argument in the second list.
In[9]:= 
Out[9]= 
Here are three matrices.
In[10]:= 
In[11]:= 
In[12]:= 
The defined function majorizeMatrixList gives the term-by-term maximum of a list of matrices of the same size.
In[13]:= 
In[14]:= 
Out[14]//MatrixForm= 
MapThread does not work unless the sublists in the second argument have equal length.
In[15]:= 

Out[15]= 
The defined function gg threads h over the list args whose elements may have different lengths.
In[16]:= 
In[17]:= 
Out[17]= 
A linear partition of a list breaks the list into a list of sublists that flatten back to the original list. This defines LinearPartition which gives all possible linear partitions of a list into a specified number of parts.
In[18]:= 
Here are all the linear partitions of a list into parts.
In[19]:= 
Out[19]= 
In[20]:= 
|