grpdelay(df3,2048,Fs)
% Plot group delay
5.1– rasm. Yuqori chastotali shovqinni olib tashlash
.
D = mean(grpdelay(df3)) % Filter delay in samples D = 35
Filtrlashdan oldin, kirish ma’lumotlar vektorining oxiriga D nol qo‘shing, x.
Bu barcha foydali namunalarni filtrdan chiqarib tashlashni
va kirish signali va
kechikish bilan kompensatsiyalangan chiqish signalining uzunligi bir xil bo‘lishini
ta'minlaydi. Ma'lumotni filtrlang va chiqish signalini D namunalari bilan
almashtirish orqali kechikishni qoplang. Ushbu oxirgi qadam filtrning vaqtinchalik
holatini samarali ravishda olib tashlaydi.
y = filter(df3,[x; zeros(D,1)]); % Append D zeros to the input data y =
y(D+1:end);
% Shift data to compensate for delay
plot(t,x,t,y,LineWidth=1.5)
title("Filtered Waveforms") xlabel("Time (s)")
legend("Original Noisy Signal","Filtered Signal") grid on
axis tight