]> gitweb.michael.orlitzky.com - octave.git/blobdiff - poisson_matrix.m
Negate the poisson matrix during its generation.
[octave.git] / poisson_matrix.m
index 696185ff0e6418649aecb60d47e05d274e9b33f3..4171374f0cb03799d3312bc29758218101717173 100644 (file)
@@ -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