-
Book Overview & Buying
-
Table Of Contents
GNU Octave Beginner's Guide
By :
Above, it was shown that we need to solve the equation:

(6.18)
where A is the coefficient matrix, given in Equations (6.14) and (6.17), φ is the vector that we are trying to find and represents, for example, the temperature at the grid points. The vector b has elements given by the source term and grid distance for interior grid point, as well as the boundary conditions for boundary points. We may write this as:

(6.19)
To solve the Poisson equation, we basically need to:
In addition, we need to convert between the vector and matrix arrays for the two-dimensional case.
Since b is given by the problem, we only need to create the coefficient matrix. We will choose here to program one Octave function that generates the matrix for the one-dimensional Poisson equation and another function that generates the matrix for the two-dimensional case.
Change the font size
Change margin width
Change background colour