difference results from int and integral of delta function
Show older comments
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 Comment
David Hill
on 5 May 2020
In method 2 you are trying to do numeric integration on a symbolic function.
Answers (0)
Categories
Find more on Assumptions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!