I trying to replace a single row using Jama .
I tried it by using setMatrix
like this -
double[][] myArray = { { 1, 1, 1, 1 }, { 1, 1, 1, 1 }, { 1, 1, 1, 1 },
{ 1, 1, 1, 1 } }; // all the matrix '1'
Matrix myMatrix = new Matrix(myArray);
myMatrix.setMatrix(2, 2, new int[] { 1, 2, 3, 4 }, new Matrix(
new double[][] { { 3, 3, 3, 3 } })); // replace 2nd row to [3,3,3,3]
System.out.println((Arrays.deepToString(myMatrix.getArray())));
but it throw java.lang.ArrayIndexOutOfBoundsException
, how to make that correctly ?