signal does not show filtered, using filter()
Ältere Kommentare anzeigen
Hello,
I have a signal that I must filter out 60-Hz noise from. I've setup the three moving averages that I want to use to see which one will filter out the 60-Hz noise. However, when I use the coefficients with the unfiltered signal using the filter() function, the plot of the unfiltered signal and the "filtered" signal remains the same. Any advice would be helpful. If someone wants to also use the text file that contains the data for the unfiltered signal, that is attached as well.
%Moving Averages' Coefficients
ync = [.25, .5, .25];
ync1 = [-.085 .342 .485 .342 -.085];
ync2 = [-.090 .060 .168 .233 .255 .233 .168 .060 -.090]
Fs1 = 500; %Sampling Frequency
Ts1 = 1/Fs1; %Sampling Time
t1 = 0:1/Fs1:1-1/Fs1;
data = load("data.txt");
dataMean = mean(data, 2);
plot(t1,dataMean); %Unfiltered Signal
z = filter(ync,1,dataMean); %Choice of Moving Average to test for filtered results
plot(t1,z);
The issue is that the unfiltered signal from the data.txt plot(t1,dataMean) looks identical to the intended filtered signal z = filter(ync,1,dataMean).
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Multirate Signal Processing 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!







