Plot step response of discrete signal

9 Ansichten (letzte 30 Tage)
Luke Brown
Luke Brown am 22 Sep. 2021
Bearbeitet: Shayan Sepahvand am 22 Sep. 2021
Is there a way to plot the step response of y[n] = y[n-2]+x[n-1]?

Antworten (1)

Shayan Sepahvand
Shayan Sepahvand am 22 Sep. 2021
Bearbeitet: Shayan Sepahvand am 22 Sep. 2021
Dear Luke,
If you take the z-transform of both sides, you will get:
then define a vector using ones(.) and set it as X. For example,
X = ones(100,1);
then use this code
Y = filter([0, 1], [1, 0, -1], X);
Finally it seems a good idea to plot Y with;
stem(Y)

Produkte


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by