concatenate method
Concatenates the given list of matrices with the current matrix along the specified axis.
matrices: List of matrices to be concatenated.
axis: 0 for concatenating along rows (vertically), and 1 for concatenating along columns (horizontally) (default is 0).
resize: If true, resizes the matrices so that they have the same dimensions before concatenation (default is false).
Returns a new concatenated matrix.
Example:
var matrixA = Matrix([[1, 2], [3, 4]]);
var matrixB = Matrix([[5, 6]]);
var result = matrixA.concatenate([matrixB]);
print(result);
// Output:
// 1 2
// 3 4
// 5 6
Implementation
Matrix concatenate(List<Matrix> matrices,
{int axis = 0, bool resize = false}) {
return Matrix.concatenate([this, ...matrices], axis: axis, resize: resize);
}