I am trying to create a rectangular pulse to use an ideal low pass filter. I am going to multiply a function in the frequency domain by a pulse going up to 1 at 0, and ending at 10,000. I have tried using the rectpulse and rectangular pulse functions but have been unable to succescfully implement the pulse as a function of time. Could someone show me how to do this please?

 채택된 답변

Image Analyst
Image Analyst 2017년 7월 30일

0 개 추천

Lets say your audio spectrum is 20,000 elements long. You can make a pulse like this.
bandPassSignal = zeros(1, length(1, audioSpectrum)); % Initialize to all zeros.
bandPassSignal(1:10000) = 1; % First 10,000 elements are now 1.
% Now multiply by the spectrum of your audio signal:
filteredAudioSpectrum = audioSpectrum .* bandPassSignal;
% Now inverse fft and listen to the sound.
filteredTimeDomainSignal = ifft(filteredAudioSpectrum);
player = audioplayer(y, filteredTimeDomainSignal);
play(player);

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Audio Processing Algorithm Design에 대해 자세히 알아보기

질문:

2017년 7월 28일

댓글:

2017년 8월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by