Skip to content

Commit 679eee8

Browse files
committed
Small fixes to tridiag_lu_decomp
Use complete sentence for help docs and change assert error messages to be more consistent.
1 parent a49bfa0 commit 679eee8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tridiag_lu_decomp.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function [alpha, beta, z, x] = tridiag_lu_decomp(a, b, c, d)
2-
% TRIDIAG_LU_DECOMP tridiagonal matrix solver for x in Ax = d
2+
% TRIDIAG_LU_DECOMP A tridiagonal matrix solver for x in Ax = d.
33
%
44
% INPUT
55
% a: diagonal values of A
@@ -21,9 +21,9 @@
2121
% validate input
2222
n = length(a);
2323
assert(n > 2, 'length of a must be > 2') % tridiagonal
24-
assert(length(b) == n, 'length of b should be same as a')
25-
assert(length(c) == n, 'length of c should be same as a')
26-
assert(length(d) == n, 'length of d should be same as a')
24+
assert(length(b) == n, 'length of b must be same as a')
25+
assert(length(c) == n, 'length of c must be same as a')
26+
assert(length(d) == n, 'length of d must be same as a')
2727
assert(abs(a(1)) > abs(c(1)), 'criteria not met: |a1| > |c1|')
2828
assert(abs(a(n)) > abs(c(n)), 'criteria not met: |an| > |cn|')
2929
for i=2:n-1

0 commit comments

Comments
 (0)