Skip to content
Prev 70376 / 398525 Next

setting elements of matrix

Richard Valliant wrote:
How about:

D <- matrix(0, 6, 5)
D[cbind(Ro, Co)] <- 1

--sundar