ideal low-pass filter transfer function

51 次查看(过去 30 天)
i have a signal in frequency domain (that i made fft and fftshift before) and i need to multiply it by a transfer function of an ideal low-pass filter with bandwith around 25Hz. i can't use the lowpass function and i need to only use the simplest basic functions.
so since it is an ideal low-pass filter, i was thinking multiply my signal with a rectangular signal in frequency domain. but my question is i don't know how to write a rectangular signal transfer function in frequency domain. Any recommendations? Thank you.

采纳的回答

Star Strider
Star Strider 2020-1-10
The ‘ideal’ filter is symmetrical about the origin in the frequency domain (after doing the fftshift call), so will be 1 from -25 Hz to +25 Hz, and zero elsewhere. Define it as such, and then do the multiplication with the signal in the frequency domain. Then use ifftshift on the filtered signal, then ifft to return it to the time domain.
Be sure to scale the result correctly, since filtering removes much of the energy in the original signal.
  2 个评论
Claire Bassem
Claire Bassem 2021-7-10
Hi i have the same exact problem as this one and i tried to follow through your steps but I'm facing some problems. first i defined the ideal LPF as a piecewise function as follows:
pw=piecewise((-25<x1)&(x1<25),1, 0);
and assuming my signal in frequency domain after fft and fftshift is called ftxs, i tried to multiply it by the piecewise function as follows
mul=pw.*ftxs
but when i try to plot it to make sure the shape is correct, i get this error:
Error using plot
Data must be numeric, datetime, duration or an array convertible to double.
and consequently if i try to get its ifft and plot it it gives out the same error.I'm guessing it has something to do with the piecewise function but i can't seem to fix it.
any advice would be of great help. thanks.
Star Strider
Star Strider 2021-7-10
I can’t offer any advice. I don’t understand the problem.
This would best be posted as a new Question, with significantly more information.
I will delete these Comments from this thread in a few hours.

请先登录,再进行评论。

更多回答(1 个)

Ismail Ata Yavuz
Ismail Ata Yavuz 2020-1-10
Once again thank you so much Mr Polar Bear :) I started to question myself that you might be my professor :)

类别

Help CenterFile Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by