필터 지우기
필터 지우기

High pass filter for the values

조회 수: 3 (최근 30일)
Aristo Pacino
Aristo Pacino 2021년 3월 17일
댓글: Star Strider 2021년 3월 31일
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.
  댓글 수: 2
Aristo Pacino
Aristo Pacino 2021년 3월 31일
Perfect! Thanks so very much.
Star Strider
Star Strider 2021년 3월 31일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (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