diff spdiag.m @ 592:4422c4476650 feature/utux2D

Merge with feature/grids
author Martin Almquist <martin.almquist@it.uu.se>
date Mon, 11 Sep 2017 14:17:15 +0200
parents 8e0067aef5b0
children e76321b89c1e
line wrap: on
line diff
--- a/spdiag.m	Mon Sep 11 14:12:54 2017 +0200
+++ b/spdiag.m	Mon Sep 11 14:17:15 2017 +0200
@@ -1,5 +1,10 @@
 function A = spdiag(a,i)
     default_arg('i',0);
+
+    if isrow(a)
+        a = a';
+    end
+
     n = length(a)-abs(i);
     A = spdiags(a,i,n,n);
 end
\ No newline at end of file