view spdiag.m @ 944:a35ed1d124d3 feature/utux2D

Change from opts to type in a few schemes
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 05 Dec 2018 10:52:37 +0100
parents e76321b89c1e
children
line wrap: on
line source

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