summaryrefslogtreecommitdiff
path: root/fir_window.awk
diff options
context:
space:
mode:
authorwukong <wukong@longaeva>2026-05-03 13:10:31 -0700
committerwukong <wukong@longaeva>2026-05-03 13:10:31 -0700
commitb60f09401a15721f626bcb7c852f68b82fe39c1c (patch)
tree0fa5ed72ec96c8b0cc83699a0497761c9ec0eed7 /fir_window.awk
parente3f9ccd5303c516d2e1c48112d8b52609ce4ad5e (diff)
replaced sum[1-4].awk with serial and columnar versions;
minor merge updates between fir_window scripts;
Diffstat (limited to 'fir_window.awk')
-rw-r--r--fir_window.awk6
1 files changed, 3 insertions, 3 deletions
diff --git a/fir_window.awk b/fir_window.awk
index 076e5df..d5ad86c 100644
--- a/fir_window.awk
+++ b/fir_window.awk
@@ -1,7 +1,7 @@
#!/usr/bin/awk -f
-### hamming.awk
-# generate a Hamming window
+### fir_window.awk
+# generate a FIR window
# R.W. Hamming, 'Digital Filters': H = '0.23 0.54 0.23'
# https://en.wikipedia.org/wiki/Window_function provides a few values for the
# 'a0' and 'a1' parameters of the raised cosine.
@@ -43,7 +43,7 @@ BEGIN {
# window interval goes from -M to M
M = 0.5*(N - 1)
- pi = 4*atan2(1,1)
+ pi = 4.0*atan2(1.0, 1.0)
for (n=-M; n<=M; n++) {
if (N > 1 && M > 0) {