![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/746299/image.png)
Plot step response of discrete signal
2 ビュー (過去 30 日間)
古いコメントを表示
Is there a way to plot the step response of y[n] = y[n-2]+x[n-1]?
0 件のコメント
回答 (1 件)
Shayan Sepahvand
2021 年 9 月 22 日
編集済み: Shayan Sepahvand
2021 年 9 月 22 日
Dear Luke,
If you take the z-transform of both sides, you will get:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/746299/image.png)
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)
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!