merge#
- MatrixOperations.merge(name1='', name2='', val1='', val2='', **kwargs)#
Merges two dense matrices or vectors into one.
Mechanical APDL Command: *MERGE
- Parameters:
- name1
str Name of the matrix or vector to extend.
- name2
str Name of the matrix or vector to be merged into
Name1.- val1
str Row number indicating where the new values are to be inserted into the
Name1vector.- val2
str Specifies how the
Name2matrix or vector is copied into theName1matrix.COL- Insert the new values at the column location specified byVal1(default).ROW- Insert the new values at the row location specified byVal1.
- name1
Notes
Warning
This function contains specificities regarding the argument definitions. Please refer to the command documentation for further explanations.
Argument Descriptions
name1 : str- Name of the matrix or vector to extend.name2 : str- Name of the matrix or vector to be merged intoName1.val1, val2 : str- Additional input. The meaning ofVal1andVal2varies depending on the entity type (matrix or vector). See details below.
The following
Val1andVal2fields are used ifName1refers to a dense matrix created by the dmat command:val1 : str- Column or row number indicating where the new values are to be inserted into theName1matrix.val2 : str- Specifies how theName2matrix or vector is copied into theName1matrix.COL- Insert the new values at the column location specified byVal1(default).ROW- Insert the new values at the row location specified byVal1.
The following
Val1field is used ifName1refers to a vector created by the vec command:val1 : str- Row number indicating where the new values are to be inserted into theName1vector.
merge can be used to add new columns or rows to a dense matrix that was created by the dmat command. In this case,
Name1must be the name of the dense matrix andName2must refer to a vector or another dense matrix.The following two examples demonstrate merging columns into a dense matrix.
The following example demonstrates merging rows into a dense matrix.
merge can also be used to add new rows to a vector that was created by the vec command. In this case,
Name1andName2must both refer to vectors, as demonstrated in the example below.In all cases, the values of the original matrix or vector are retained, and the matrix or vector is resized to accommodate the additional rows or columns.