How to draw the delta signal in matlab

74 ビュー (過去 30 日間)
Juman Saleh
Juman Saleh 2023 年 3 月 27 日
回答済み: Star Strider 2023 年 3 月 28 日
I was trying to draw but I wasn't able to

回答 (2 件)

the cyclist
the cyclist 2023 年 3 月 27 日
編集済み: the cyclist 2023 年 3 月 27 日
Do you mean the Dirac delta function? If so, then dirac might help you.
Also, if you do mean the Dirac delta, I hope you realize that it can't truly be "drawn", because it goes to infinity. It can be represented somehow (e.g. by drawing an arrow at the x location where the Delta is).
  1 件のコメント
Juman Saleh
Juman Saleh 2023 年 3 月 28 日
i know the function but how to plot d(t-1)

サインインしてコメントする。


Star Strider
Star Strider 2023 年 3 月 28 日
The function normally will not plot in MATLAB because it has infinite amplitude and infinitesimal width.
So it is necessary to approximate it in ordfer to plot it —
t = linspace(0, 2, 21);
Delta = dirac(t - 1)
Delta = 1×21
0 0 0 0 0 0 0 0 0 0 Inf 0 0 0 0 0 0 0 0 0 0
idx = Delta == Inf;
Delta(idx) = 1;
figure
stem(t, Delta, 'filled')
axis('padded')
.

カテゴリ

Help Center および File ExchangeSpectral Measurements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by