From 2fbcf94908d646ec62d2f15f7ec35288c6ac1cfe Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 15 Oct 2012 22:16:13 -0400 Subject: [PATCH] Negate the poisson matrix during its generation. --- poisson_matrix.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.43.2