annotate spdiag.m @ 87:0a29a60e0b21

In Curve: Rearranged for speed. arc_length_fun is now a property of Curve. If it is not supplied, it is computed via the derivative and spline fitting. Switching to the arc length parameterization is much faster now. The new stuff can be tested with testArcLength.m (which should be deleted after that).
author Martin Almquist <martin.almquist@it.uu.se>
date Sun, 29 Nov 2015 22:23:09 +0100
parents 0be702829bb9
children 9c0192cf099f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
45
b6cfc04e576c Changed spdiag to be more like matlabs diag.
Jonatan Werpers <jonatan@werpers.com>
parents: 27
diff changeset
1 function A = spdiag(a,i)
51
0be702829bb9 Generalized spdiag. Added function for createing a banded sparse matrix.
Jonatan Werpers <jonatan@werpers.com>
parents: 45
diff changeset
2 n = length(a)-abs(i);
45
b6cfc04e576c Changed spdiag to be more like matlabs diag.
Jonatan Werpers <jonatan@werpers.com>
parents: 27
diff changeset
3 A = spdiags(a,i,n,n);
27
97a638f91fb8 Added function spdiag(). Fixed a bunch of bugs in the Wave2dCurve scheme.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
4 end