What Are High-Pass and Low-Pass Filters?
Here is how you implement a low-pass filter using convolution: double[] signal = (some 1d signal); double[] filter = [0.25 0.25 0.25 0.25]; // box-car filter double[] result = new double[signal.Length + filter.Length + 1]; // Set result to zero: for (int i=0; i < result.Length; i++) result[i] = 0; // Do convolution: for (int … Read more