From 4c4eb1bd8f003b3b57707badd2dd089ed193a896 Mon Sep 17 00:00:00 2001 From: wukong Date: Fri, 10 Apr 2026 23:46:12 -0700 Subject: renamed fir window generators; minor edits to whitespace and comments for more consistent style; --- ludcmp.awk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ludcmp.awk') diff --git a/ludcmp.awk b/ludcmp.awk index 6c7807a..8097263 100644 --- a/ludcmp.awk +++ b/ludcmp.awk @@ -11,6 +11,7 @@ # note, matrix indexing begins with 1 and uses i=row, j=col # lu = L + U - I + # decomposition of A function lu_decomp(A, n) { @@ -43,6 +44,7 @@ function lu_decomp(A, n) { } } + # regex to identify strings that look like numbers BEGIN { OFS = FS @@ -53,12 +55,14 @@ BEGIN { number = "^" sign "(" decimal "|" fraction ")" exponent "$" } + # column headers NR == 1 { for (n=1; n<=NF; n++) ($n ~ number) ? head[n] = "col" n : head[n] = $n } + # read input data NF { @@ -74,17 +78,17 @@ NF { print(matrix[count[n],n]) } } - } + END { printf(ORS) print(NR, max_nf, size) printf(ORS) lu_decomp(matrix, size) - } + ## find solution of Ly = b, for y #for (i=0; i