Is there a way to make dirac delta function be 1 at the origin?
32 views (last 30 days)
Show older comments
Hi. I'm having some issues with delta function. I need to use symbolic variables and functions which I need to differentiate. Since some heaviside functions are present in my main function, its differentiation brings me delta functions. I need them to give 1 if the delta argument is zero, but I obtain infinite. Is there a way to avoid this (maybe with a different differentation matlab function)? I use the diff() function to differentiate my sym function.
0 Comments
Accepted Answer
Ameer Hamza
on 28 May 2020
Replace dirac with kroneckerDelta
syms x
f(x) = heaviside(x);
g(x) = diff(f);
Result
>> g(0)
ans =
Inf
Now run
g(x) = subs(g, dirac(x), kroneckerDelta(x));
Result
>> g(0)
ans =
1
0 Comments
More Answers (0)
See Also
Categories
Find more on Mathematical Functions 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!