how to write delta function like this?

8 ビュー (過去 30 日間)
Kuheli Mondal
Kuheli Mondal 2016 年 3 月 31 日
コメント済み: Ced 2016 年 3 月 31 日
h(n)=delta(n-3)-2*delta(n-4); delta(n==0)=1 can any one help me. Thank you.
  1 件のコメント
Ced
Ced 2016 年 3 月 31 日
The delta function in this case is defined as
"if n is equal to 0, then the function value is 1, else, the function value is 0"
You can implement it just like that in matlab.

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

回答 (1 件)

Jan
Jan 2016 年 3 月 31 日
delta = (n==0);
  1 件のコメント
Ced
Ced 2016 年 3 月 31 日
Did you mean to write
delta = @(n)(n==0);
?

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

カテゴリ

Help Center および File ExchangeParallel for-Loops (parfor) についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by