I have this code snippet in R:
for(i in 1:n-1){
for(j in 2:n){
mult = (matrx[j,i]/matrx[i,i])
vector = matrx[j,] - (matrx[j-1,] * mult)
print(vector)
# matrx[j,] = vector
}
}
The code prints the vector variable correctly, but it does not replace the matrx[j,] with the values in the vector when i equate it to matrx[j,] = vector.
How do i solve this?