How to set sample values to zero
조회 수: 9 (최근 30일)
이전 댓글 표시
I need to find samples of my noisy signal that are below the noise amplitude and set those to zero. Thank you for any help
댓글 수: 0
답변 (1개)
Voss
2022년 5월 19일
Use x(x < threshold) = 0, where x is your signal and threshold is your noise amplitude. Or x(abs(x) < threshold) = 0, if you meant the amplitude of the signal is below the noise amplitude.
Here's a concrete example:
% random signal
x = 0.25*rand(1,20);
plot(x,'-o');
hold on
% set values below 0.1 to 0:
x(x < 0.1) = 0;
plot(x,'.-');
legend({'original' 'new'})
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Audio Processing Algorithm Design에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
