Q <- matrix(0, nrow = n, ncol = n)
Q[1, 1:2] <- Q[n, n:(n-1)] <- c(1,-1)
for( j in 2:(n-1) )
Q[j,] <- c( rep(0,j-2), c(-1,2,-1), rep(0, n-j-1))
Any scripts or data that you put into this service are public.
Add the following code to your website.
Copy to clipboard
For more information on customizing the embed code, read Embedding Snippets.