High pass filter for the values

3 次查看(过去 30 天)
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.

采纳的回答

Star Strider
Star Strider 2021-3-17
‘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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Digital Filter Analysis 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by