updateGraph(w = c(0.5, 0.5, 0, 0),
G = matrix(c(0, 0.5, 0.5, 0, 0.5, 0, 0, 0.5,
0, 1, 0, 0, 1, 0, 0, 0),
nrow=4, ncol=4, byrow=TRUE),
I = c(1, 2, 3, 4),
j = 1)
Run the code above in your browser using DataLab