annotate spdiag.m @ 42:f121bf58c1b9

Added a function for easily benchmarking a Discretization.
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 05 Nov 2015 16:08:57 -0800
parents 97a638f91fb8
children b6cfc04e576c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27
97a638f91fb8 Added function spdiag(). Fixed a bunch of bugs in the Wave2dCurve scheme.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
1 function A = spdiag(a)
97a638f91fb8 Added function spdiag(). Fixed a bunch of bugs in the Wave2dCurve scheme.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
2 n = length(a);
97a638f91fb8 Added function spdiag(). Fixed a bunch of bugs in the Wave2dCurve scheme.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
3 A = spdiags(a,0,n,n);
97a638f91fb8 Added function spdiag(). Fixed a bunch of bugs in the Wave2dCurve scheme.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
4 end