view spdiag.m @ 70:243c558dc3ae

Made end of animated quantity plot nicer.
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 23 Nov 2015 14:07:03 +0100
parents 0be702829bb9
children 9c0192cf099f
line wrap: on
line source

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