view spdiag.m @ 1237:6e4cc4b66de0 feature/dirac_discr

Remove overloading of norm() and fnorm
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 20 Nov 2019 00:13:56 +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