X-Git-Url: http://gitweb.michael.orlitzky.com/?p=octave.git;a=blobdiff_plain;f=poisson_matrix.m;h=4171374f0cb03799d3312bc29758218101717173;hp=696185ff0e6418649aecb60d47e05d274e9b33f3;hb=2fbcf94908d646ec62d2f15f7ec35288c6ac1cfe;hpb=d7a73d33b0567c9abd72151b2972d7c0eb66e6a1 diff --git a/poisson_matrix.m b/poisson_matrix.m index 696185f..4171374 100644 --- a/poisson_matrix.m +++ b/poisson_matrix.m @@ -60,6 +60,7 @@ function A = poisson_matrix(integerN, x0, xN) A = cat(1, A, u_row); end - ## Finally, append the last row for xN. - A = cat(1, A, u_xN_coeffs); + ## Finally, append the last row for xN and negate the whole thing (see + ## the definition of the poisson problem). + A = - cat(1, A, u_xN_coeffs); end