To design a Butterworth high-pass filter of order 20, which eliminates the frequency of 261.625Hz from the signal 'x' in MATLAB, follow these steps:
Determine the required cut-off frequency for the high-pass filter. Let's assume the desired cut-off frequency is 300Hz in this case.
Calculate the normalized cut-off frequency of the filter using the formula: wc = 2pifc/fs where fc is the cut-off frequency, fs is the sampling frequency of the signal, and wc is the normalized cut-off frequency.
In our case, assuming the sampling frequency to be 1000Hz, wc can be calculated as follows: wc = 2pi300/1000 = 1.88496
In our case, the MATLAB code to design the Butterworth high-pass filter is as follows:
main.m250 chars7 lines
In our case, assuming the signal 'x' is a row vector containing the sampled values, the MATLAB code to apply the high-pass filter to 'x' is as follows:
main.m81 chars3 lines
After applying this filter, the output signal 'y' will not contain the frequency component of 261.625Hz.
gistlibby LogSnag