High pass filter for the values
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Aristo Pacino
am 17 Mär. 2021
Kommentiert: Star Strider
am 31 Mär. 2021
Hello,
I want to have a high pass filter such that values above zero remain, and the amplitudes of the negative values are somehow reduced as shown in the figure. I am also attaching the data wherein the first coloumn is x-axis and second column is y axis.
Thanks very much in advance.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/554322/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/554322/image.png)
0 Kommentare
Akzeptierte Antwort
Star Strider
am 17 Mär. 2021
‘I want to have a high pass filter such that values above zero remain, and the amplitudes of the negative values are somehow reduced as shown in the figure’
That is not how a highpass filter works. It passes frequencies above a certain value, not amplitudes.
If you want to reduce the amplitudes of the values less than zero, experiment with this:
D = load('data.txt');
x = D(:,1);
y = D(:,2);
yr = y;
yr(y<0) = -y(y<0).^2;
figure
plot(x, y)
hold on
plot(x, yr)
hold off
grid
Other transformations (or hard limits) could also be appropriate.
2 Kommentare
Weitere Antworten (0)
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!