view spdiag.m @ 27:97a638f91fb8

Added function spdiag(). Fixed a bunch of bugs in the Wave2dCurve scheme.
author Jonatan Werpers <jonatan@werpers.com>
date Sun, 27 Sep 2015 22:15:37 +0200
parents
children b6cfc04e576c
line wrap: on
line source

function A = spdiag(a)
    n = length(a);
    A = spdiags(a,0,n,n);
end