Question: Filtering the noise 1 solution submitted (max: Unlimited) | View my solutions Your task is to use a filter to remove noise from a signal


Filtering the noise 1 solution submitted (max: Unlimited) | View my solutions Your task is to use a filter to remove noise from a signal in this problem. In oder to achieve this you will need a narrow bandpass filter. The filter coefficients are already given here. This is due to the limitations of MATLAB Grader. The normal version of MATLAB has powerful filter design tools available. Investigate on how to use the filter function and complete the code below. Also provide appropriate labels for the graphs. Script C Reset DOMA 4 1 f = 500; % frequency in Hz 2 FS = 10000; % Sampling frequency in Hz 3 dt = 1/FS; % Sampling period L = 1000; % number of points 5 t = (0:L-1)*dt; % Time vector 6 7 % generate signal with noise 8 x_unfiltered = sin(2*pi*f*t) + 0.3*randn(size(t)); 9 10 % plot unfiltered signal (partially) 11 plot(t(100:400), x_unfiltered (100:400)); 12 axis 'tight'; 13 13 14 15 % filter coefficients for a bandpass filter 16 b = [0.001 0 -0.002 0 0.001]; 17 a = [1 -3.7216 5.3754 -3.5598 0.915); 18 19 % perform filter step 20 x_filtered = 21 21 22 % plot filtered signal (partially) 23 figure; 24 plot(t(100:400), x_filtered (100:400)); 25 axis 'tight'; 26 27
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
