How to plot digital sequence in MATLAB
3 ビュー (過去 30 日間)
古いコメントを表示
I have to plot following digital sequence in MATLAB: a^n * u[n]. a is just a constant. How do I do this?
Thanks
0 件のコメント
採用された回答
David Hill
2022 年 5 月 24 日
n=1:length(u);
a=1.7;
plot(n,a.^n.*u);%assuming u is a vector
3 件のコメント
Walter Roberson
2022 年 5 月 25 日
stem()
Note: u[n] is not a vector as such: it indicates the unit step function.
その他の回答 (1 件)
Walter Roberson
2022 年 5 月 24 日
If you are certain that all of your values are finite, then you can replace u[n] by (n>=0)
If you have negative infinite values then it is not obvious that multiplying by the unit step function is well defined.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!