Matrix.Split Method

void Split(Int32 ARows, Int32 ACols, TMtx[] Dst)

Splits matrix in blocks.

#NameTypeDescription
1ARowsInt32
2AColsInt32
3DstTMtx[]

Result: stored in self (calling object)

Remarks:

Splits the calling matrix in blocks. Example:

[ A B ]
[ C D ]

where A,B,C,D are matrices of size 2x2 and the calling matrix is of size 4x4. ARows and ACols define the number of rows and columns of the block based matrix. The matrices passed in the dst array to be filled with values from the calling matrix, must already have matching size and complex properties to cover the calling matrix or an exception will be raised.

Examples
Matrix A;
Matrix B;
Matrix C;
Matrix D;
Matrix E;
A.Size(2,2);
B.Size(A);
C.Size(A);
D.Size(A);
E.SetIt(4,4,false,[1,2,3,4
5,6,7,8
9,1,2,3
4,5,6,7]);
E.Split(2,2,[A,B,
C,D]);
// A becomes:
// [1,2,
//  5,6]

// B becomes:
// [3,4,
//  7,8]

// C becomes:
// [9,1,
//  4,5]

// D becomes:
// [2,3,
//  6,7]
See Also: Matrix.Concat, Matrix.ConcatVert, Matrix.ConcatHorz