view spdiag.m @ 105:1df4f3704b76 feature/arclen-param

Added error checking for all methods that use the derivative gp. Removed that from the to do list. Updated some comments.
author Martin Almquist <martin.almquist@it.uu.se>
date Mon, 07 Dec 2015 18:51:41 +0100
parents 9c0192cf099f
children 8e0067aef5b0
line wrap: on
line source

function A = spdiag(a,i)
    default_arg('i',0);
    n = length(a)-abs(i);
    A = spdiags(a,i,n,n);
end