Matrix: Shrink
Combine or remove rows or columns of matrix by specified factor
1. mshrink
2. mshrink cols:=2 rows:=1
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
Matrix | m |
Input MatrixObject |
|
Specifies the input matrix. |
Col Factor | cols |
Input int |
|
Specifies a factor to reduce the number of columns. For example, if Col Factor is 2, every two columns in the input matrix will be shrank into one column. |
Row Factor | rows |
Input int |
|
Specifies a factor to reduce the number of rows. For example, if Row Factor is 2, every two rows in the input matrix will be shrank into one row. |
Shrink Method | method |
Input int |
|
According to the column factor and row factor, define the shrink sub-range of the cells in the Matrix. For example, if Col Factor is 2 and Row Factor is 2, four cells (from every two columns and every two rows) will be a sub-range . This option specifies which value will be output when shrank.
|
Output Matrix | om |
Output MatrixObject |
|
Specifies the output matrix. See the syntax here. |
This X-Function can be used to Combine or remove the number of columns and rows of a matrix.
mdim, mexpand, mproperty, mreplace, mrotate90, msetvalue, mflip, mtranspose , msmooth
Keywords:shrink