How to write delta in matlab?
155 ビュー (過去 30 日間)
古いコメントを表示
x2[n]= 2delta[n] - u[n - 1] + u[n - 3]
How to I type this in matlab? Like what is the syntax for delta in matlab?
3 件のコメント
回答 (2 件)
Walter Roberson
2023 年 10 月 24 日
Like what is the syntax for delta in matlab?
MATLAB does not have the delta operator. The suggested dirac() does not work for this purpose:
n = [-1 0 1]
dirac(n)
dirac(sym(n))
but your delta function should be 1 at parameter 0.
You need to define it yourself, such as
delta = @(x) double(x==0);
delta(n)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!