changeset 798:e76321b89c1e feature/grids

Fix bug in spdiag
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 26 Jul 2018 17:47:21 -0700
parents c7c622e26a53
children e3d963997527 6b83dcb46f54
files spdiag.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
diff -r c7c622e26a53 -r e76321b89c1e spdiag.m
--- 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