the below code creates a narrow-band lowpass signal that is corrupted with a high-frequency random noise. your job is to filter out the high frequency noise using Fourier domain filtering. generate a frequency response vector for an ideal filter and use multiplication in the frequency domainplot the before and after time-domain signals
notice: You need to create a filter to remove the high freq rand noise. Create a filter
called zc using the same idea as z, but used to remove noise, not add it. Then apply it in the freq domain and ifft to see results.
clear all;close all;clc

n = 0:255;
x = 0.1*n.*exp(-0.03*n);
plot(n,x);axis([0 255 0 1.3]);
title('Origianl Signal');

z = [zeros(1,50) ones(1,156) zeros(1,50)];
y = 4*rand(1,256)-1;
YF = z.*fft(y);
yinv = ifft(YF);
s = x+yinv;
plot(n,s);axis([0 255 -2 4]);
title('Noise corrupted signal');

%% put your code here