diff spdiag.m @ 798:e76321b89c1e feature/grids

Fix bug in spdiag
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 26 Jul 2018 17:47:21 -0700
parents 8e0067aef5b0
children
line wrap: on
line diff
--- a/spdiag.m	Wed Jul 25 18:36:57 2018 -0700
+++ b/spdiag.m	Thu Jul 26 17:47:21 2018 -0700
@@ -5,6 +5,6 @@
         a = a';
     end
 
-    n = length(a)-abs(i);
+    n = length(a)+abs(i);
     A = spdiags(a,i,n,n);
 end
\ No newline at end of file