That looks like a discretization of Poisson's equation. Am I right? If so, shouldn't the be negative?
I can't say I know how to visualize the matrix in Mathematica, but here's a visualization of it.
Hello I want to view the entries of a block tridiagonal matrix. The matrix is defined by
and
I want to examine the structure of this matrix. Obviously writing this out by hand is a laborious task so I was wondering if mathematica can help me.
I tried
Table[Subscript[u, i, j - 1] + Subscript[u, i - 1, j] +
4 Subscript[u, i, j] + Subscript[u, i + 1, j] + Subscript[u, i,
j + 1] - h^2 Subscript[f, i, j], {i, 3}, {j, 4}]
But this doesn't quite output what I want. Can somebody tell me how I can construct this matrix more explicitly in Mathematica?
Try this:
Code:Table[Subscript[u, i, j - 1] + Subscript[u, i - 1, j] - 4 Subscript[u, i, j] + Subscript[u, i + 1, j] + Subscript[u, i, j + 1] - h^2 Subscript[f, i, j], {i, 3}, {j, 4}]//MatrixForm