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]); -