Bandpass Filter Not Filtering Signal
Ältere Kommentare anzeigen
Hi, I've currently designed a bandpass filter to filter a signal between 1 and 30 Hz, but when plotting it, my signal still has a random spike at 60 Hz when plotted through an absolute value squared fft, despite the filter properly being set up to cap at 30.
My code is as follows:
y = data;
data2 = double(y);
fs = 2000
samples = length(y);
yfilt = bandpass(data2, [1,30], fs);
y1 = fft(data2);
power1 = abs(y1).^2/samples;
y5 = fft(yfilt);
power5 = abs(y5).^2/samples;
which results in this large spike for the filtered data

can anyone explain what's causing this?
1 Kommentar
Mathieu NOE
am 20 Apr. 2023
can you share your data ?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Get Started with Signal Processing Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



