powered by
add.Edges(grid,point.a, point.b)
##initialize data m <- matrix(0,10,10) point.a <- c(5,8) point.b <- c(10,3) ##calculate the distance of the two points m <- add.Edges(m,point.a,point.b) image(m)
Run the code above in your browser using DataLab