difference results from int and integral of delta function
Afficher commentaires plus anciens
Hello Matlab experts:
I am trying to calculate the integral of delta function, however I got two different answers. apparently answer 0 is wrong. Can anyone explain the difference for me?
really appreciate.
Regards
Method 1:
>> int(dirac(x), -inf, inf)
ans =
1
Method 2:
>> delta_fun = @(t) dirac(t);
>> integral(delta_fun, -inf, inf)
ans =
0
>> delta_fun(0)
ans =
Inf
1 commentaire
David Hill
le 5 Mai 2020
In method 2 you are trying to do numeric integration on a symbolic function.
Réponses (0)
Catégories
En savoir plus sur Assumptions dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!