Summation of Delta function on R2013b

I have an impulse response h(n) as mentioned below.Can someone please help me how to simulate this on MATLAB R2013b since I cannot get symsum(delta(k),k,0,N-1) to work on this version of MATLAB. If someone could please post a snippet that would be really helpful.
h(n) = (1/N)*((k=0 to N-1)[delta(k)] where delta(k) is an unit impulse.

Answers (1)

h = @(N) sum( dirac(0:N-1) )
This will be infinite for all non-negative N because it includes delta(k) where k = 0, and delta(0) is infinite.
Perhaps you are looking for
syms N K
h = symsum(dirac(k),k,0,N-1)
the result for which will display as
sum(dirac(k), k == 0..N - 1)
I tested these in R2013b.

Asked:

on 18 Sep 2018

Answered:

on 18 Sep 2018

Community Treasure Hunt

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

Start Hunting!