diff options
| author | wukong <wukong@longaeva> | 2026-04-10 23:46:12 -0700 |
|---|---|---|
| committer | wukong <wukong@longaeva> | 2026-04-10 23:46:12 -0700 |
| commit | 4c4eb1bd8f003b3b57707badd2dd089ed193a896 (patch) | |
| tree | 15b62907fffd70c46a9b4369df93ab33c6aa88ac /ludcmp.awk | |
| parent | e7d1781578e846a7b1d634cd43c8fab00a67b883 (diff) | |
renamed fir window generators;
minor edits to whitespace and comments for more consistent style;
Diffstat (limited to '')
| -rw-r--r-- | ludcmp.awk | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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<n;, i++) { # sum = 0 |
