How to convert a delta function to a vector

I have a delta function
h = dirac(t)+ 0.5*dirac(t-1)
I want to convert it to a vector. I tried zeros and ones, but doesn't help.

回答 (1 件)

Walter Roberson
Walter Roberson 2017 年 4 月 6 日

0 投票

Given a vector of t values,
h = (t == 0) + 0.5 * (t == 1);

カテゴリ

ヘルプ センター および File ExchangeDynamic System Models についてさらに検索

質問済み:

2017 年 4 月 6 日

回答済み:

2017 年 4 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by