setAt method

void setAt(
  1. int row,
  2. int col, {
  3. required double value,
})

Set the value of a matrix at a specific index

  • row The row index
  • col The column index
  • value The value to set
  • Example
Matrix matrix = Matrix(2, 2);
matrix.setAt(0, 0, value: 1);

Implementation

void setAt(int row, int col, {required double value}) {
  _matrix[row][col] = value;
}