- HasNan
- Transpose
- TriL
- TriU
- Diag
- Row
- Col
- Copy
- Compare
- CompareByDigits
- Flat
- Clip
- Reshape
- Resize
- Set
- SwapRows
- SwapCols
- Split
- Hsplit
- Vsplit
- ArgSort
- Sort
Vsplit
Split a matrix vertically into multiple submatrices. Same as Split with axis=1
bool matrix::Vsplit(
|
Parameters
parts
[in] The number of submatrices to divide the matrix into.
splitted
[out] Array of resulting submatrices.
Return Value
Returns true on success, false otherwise.
Note
If the number of submatrices is specified, then same size submatrices are obtained. It means that the number of columns must be divisible by 'parts' without a remainder. Submatrices of different sizes can be obtained using an array of submatrix sizes. The elements of the size array are used until the entire matrix is divided. If the array of sizes has ended, and the matrix has not yet been completely divided, the undivided remainder will be the last submatrix.
Example
matrix matrix_a={{ 1, 2, 3, 4, 5, 6},
|