Documente Academic
Documente Profesional
Documente Cultură
%% Filter parameters:
L = N+1; % filter length
n_h = (-(L-1)/2:(L-1)/2);
y2_conv=ifft(HY,N2);
t2_conv = 0:1/Fs:(N2-1)*(1/Fs);
figure(1),subplot(3,2,2), plot(t,y), %axis(ax2)
hold on,plot(t2_conv,y2_conv)
legend('Origin','Filtered (conv)')
y2_kali=ifft(YH,N2);
t2_kali = 0:1/Fs:(N2-1)*(1/Fs);
figure(1),subplot(3,2,4),plot(t,y),
hold on, plot(t2_kali,y2_kali),%axis(ax2)
legend('Origin','Filtered (kali)')
%% Removing delay
delay = mean(grpdelay(Hd));
t_fdesignlow2=t(1:end-floor(delay));
y_fdesignlow2=y_fdesignlow(floor(delay)+1+length(nol):end-
length(nol)+floor(delay));
figure(101),subplot(2,1,2)
plot(y_fdesignlow),hold on, plot(y_fdesignlow2)
title('fdesign.lowpass : With Zero Padding'),legend('Moved delay','Still
delayed')
HIGH PASS FILTER
%% Filter parameters:
L = N+1; % filter length
n_h = (-(L-1)/2:(L-1)/2);