How do I calculate the impulse response?

조회 수: 133(최근 30일)
dhanshri kulkarni
dhanshri kulkarni 2015년 2월 26일
답변: K Karthika 2021년 8월 27일
How do I write the code in order to get the impluse response for the following equation:

채택된 답변

michael scheinfeild
michael scheinfeild 2015년 2월 26일
f=100;% frequanecy
% ~ (check indexes im not sure ..)
  댓글 수: 1
Jens Kritian  Poulsen
Jens Kritian Poulsen 2021년 3월 2일
There are errors in the solution shown by Michael Scheinfeild, e.g. last line and it doesn't calculate the impulse response.
The solution by John D'Errico is okay (albeit a bit short)
The problem by itself is so simple you don't really need Matlab ([1 1 1] is the impulse response).

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

추가 답변(3개)

John D'Errico
John D'Errico 2015년 2월 26일
Use filter, or conv. WTP?
Compute the vector x, then get y from x.
y = conv(x,[1 1 1]);
and if x was [0 0 1 0 0], then what would y be from the above call to conv?

MathWorks Support Team
MathWorks Support Team 2019년 5월 22일
To compute a 3 tap FIR filter impulse response, use “fft” with the corresponding coefficients. In this case,
>> fft([1 1 1])
Depending on the frequency resolution that you need, you will also have to specify the length of the transformation.

K Karthika
K Karthika 2021년 8월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by