A <- matrix(1:50, nrow = 5) #a matrix
B <- matrix(3:7, nrow = 5) #another matrix
C <- matrix(data = NA, nrow = nrow(A), ncol = ncol(A))
I want to divide each cell in each row A by the single cell in each row B and I want the result to be stored in C. I have tried using for loop but I don't know how to do that.