From e001025849e3731d435ea8acabc2d0be07fb5c6e Mon Sep 17 00:00:00 2001 From: Michael Bloom Date: Sun, 5 May 2024 12:47:06 -0400 Subject: [PATCH] Cleanup octave script --- test_data/WriteImpulse.m | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/test_data/WriteImpulse.m b/test_data/WriteImpulse.m index 2f42e16..2a4dd57 100644 --- a/test_data/WriteImpulse.m +++ b/test_data/WriteImpulse.m @@ -8,11 +8,10 @@ fs2 = fs / 2; n = 1000; impulse = [1,zeros(1, n-1)]; -step = fs/n; -x = 0:step:fs - step; +N = 8; + f0 = 200; Q = 1.4; -N = 8; %HP filter [z, p, k] = butter ( N, f0 / fs2, "high" ); @@ -33,17 +32,8 @@ filtered = sosfilt(sos, impulse); csvwrite("impulse_response/BPimpulse.csv", [3, fs, f0, Q, n, filtered]); -clear all -close all -fs = 39e3; -fs2 = fs / 2; -n = 1000; -impulse = [1,zeros(1, n-1)]; -step = fs/n; -x = 0:step:fs - step; f0 = 2000; Q = 0.8; -N = 8; %HP filter [z, p, k] = butter ( N, f0 / fs2, "high" ); @@ -64,17 +54,8 @@ filtered = sosfilt(sos, impulse); csvwrite("impulse_response/BPimpulse2.csv", [3, fs, f0, Q, n, filtered]); -clear all -close all -fs = 39e3; -fs2 = fs / 2; -n = 1000; -impulse = [1,zeros(1, n-1)]; -step = fs/n; -x = 0:step:fs - step; f0 = 15000; Q = 2.0; -N = 8; %HP filter [z, p, k] = butter ( N, f0 / fs2, "high" ); @@ -94,4 +75,3 @@ sos = zp2sos(z, p, k); filtered = sosfilt(sos, impulse); csvwrite("impulse_response/BPimpulse3.csv", [3, fs, f0, Q, n, filtered]); -