Interpolation on same number of samples after FIR filtration
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Lukas Poviser
am 3 Mai 2022
Kommentiert: Star Strider
am 3 Mai 2022
Hi,
I have made FIR filtration of my signal (sampled 25 Hz, 4500 samples) and after filtration that signal has about 200 samples less. The original signal is synced with another signal. And I need these two signals to work together and have same number of samples. What is best solution? How to interpolate filtrated signal to the same number of samples like before?
0 Kommentare
Akzeptierte Antwort
Star Strider
am 3 Mai 2022
Filtering should not change the signal length.
I am not certain exactly what you are doing, how your designed your FIR filter, or what your signal is.
1 Kommentar
Star Strider
am 3 Mai 2022
‘That is my filter. Before filtration the signal has 4538 samples and after it has just 4477 samples.’
I cannot reproduce that behaviour —
y2 = randn(1,4538);
fs = 25;
fc = 0.65; % cut off frequency
Nfir = 124; % order of filter
N = length(y2);
wc=fc/(fs/2);
fil=fir1(Nfir,wc); % Filter design
filt_y_fir = filter(fil,1,y2); % filtering
filtered_signal_size = size(filt_y_fir)
filt_y_fir = filtfilt(fil,1,y2); % filtering
filtered_signal_size = size(filt_y_fir)
figure
freqz(fil,1,2^16,fs)
.
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Digital Filter Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!