Set cells in matrix equal to sqrt(10^-7), when the cells of the fft of the matrix obey 20.log10(a​bs(mat_tau​))<=-20

1 回表示 (過去 30 日間)
demos serghiou
demos serghiou 2022 年 10 月 23 日
回答済み: Nikhil 2022 年 10 月 27 日
I have a complex matrix mat_tau. I want for the cells of mat_tau which obey 20.log10(abs(mat_tau))<=-20 to equal to -70, and the same cells in ifft (mat_tau) to equal sqrt(10^-7). How can I do that?
  4 件のコメント
demos serghiou
demos serghiou 2022 年 10 月 23 日
Thanks for the reply. I just want the noise floor components that are less or equal to -20 to be removed from the ifft and can be set as zero instead of sqrt(10^-7). Any suggestions on how to code it?
dpb
dpb 2022 年 10 月 23 日
Doesn't matter what the value is, destroying the symmetry and values of the FFT will muck up the IFFT drastically.
Unless the input signal is composed of simple sinusoids at the precise frequencies of the FFT bins, then zero-ing out bins in the frequency domain is equivalent to convolving the signal in the time domain with a series of overlapping rectangular windows at those frequencies. This will end up causing "ringing" in the inverse FFT.
Another way to think of it is that removing a given frequency bin is the same as adding the component at that frequency but with opposite phase. This also can be seen to be a bad idea in the time domain.

サインインしてコメントする。

回答 (1 件)

Nikhil
Nikhil 2022 年 10 月 27 日
You can use logical indexing.
mat_tau(20.*log10(abs(mat_tau))<=-20) = -70
Similarly for any matrix.

カテゴリ

Help Center および File ExchangeFourier Analysis and Filtering についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by