Is it correct? (dirac delta function)

 Respuesta aceptada

Walter Roberson
Walter Roberson el 19 de Abr. de 2020

1 voto

no it should be 2*(n==0)
However there is another sense in which dirac(x) should be infinite when x is 0 instead being 1.

Más respuestas (1)

Ameer Hamza
Ameer Hamza el 19 de Abr. de 2020
You code is correct. Another way is to use built-in kroneckerDelta function.
n = sym(-5:5);
xn = kroneckerDelta(n,-2) - 2*kroneckerDelta(n,0) + kroneckerDelta(n,2);
stem(n, xn, 'b', 'filled')
axis([-10 10 -5 5])

Categorías

Etiquetas

Preguntada:

el 19 de Abr. de 2020

Respondida:

el 19 de Abr. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by