I need to concatenate two matrixes in JAMA.
double[][] m1 = {{1,1,1}, {1,1,1}};
double[][] m2 = {{2,2,2}, {2,2,2}, {2,2,2}};
Matrix mm1 = new Matrix(m1);
Matrix mm2 = new Matrix(m2);
I want to do the following,
Matrix mm3 = [ mm1; mm2; ] // in Matlab syntax
which will return me the following Matrix,
1 1 1
1 1 1
2 2 2
2 2 2
2 2 2
How can I do that?
Assuming that the rows of the resulting matrix should be copies of the rows of the original matrices:
EDIT: Assuming that you only have the matrices, and not the
double[][]
arrays that they have been created from, and you want a new Matrix, then you can add another method