Azzera filtri
Azzera filtri

How do I calculate the impulse response?

6 visualizzazioni (ultimi 30 giorni)
How do I write the code in order to get the impluse response for the following equation:

Risposta accettata

michael scheinfeild
michael scheinfeild il 26 Feb 2015
f=100;% frequanecy
% ~ (check indexes im not sure ..)
  1 Commento
Jens Kritian Poulsen
Jens Kritian Poulsen il 2 Mar 2021
Modificato: Jens Kritian Poulsen il 2 Mar 2021
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).

Accedi per commentare.

Più risposte (3)

John D'Errico
John D'Errico il 26 Feb 2015
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 il 22 Mag 2019
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.

Altanshagai il 10 Mar 2023
[1 1 1]

Community Treasure Hunt

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

Start Hunting!

Translated by