generate K matrix of size (n-2) x n (non-cyclic case), where n is size of map
rw2(mesh, cyclic = FALSE, ...)
a list
r2 <- rw2(1:7); r2$K
#> 7 x 7 sparse Matrix of class "dgCMatrix"
#>
#> [1,] 1 . . . . . .
#> [2,] . 1 . . . . .
#> [3,] 1 -2 1 . . . .
#> [4,] . 1 -2 1 . . .
#> [5,] . . 1 -2 1 . .
#> [6,] . . . 1 -2 1 .
#> [7,] . . . . 1 -2 1