Why is the int (integral) of the dirac function sign/2 instead of the heaviside function?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 30 Juil 2019
Modifié(e) : MathWorks Support Team
le 29 Août 2024
In MATLAB, the result of taking the integral of the "dirac" function is sign/2.
In many resources online and in textbooks the integral of the dirac delta function is defined as the heavyside step function. One such example can be found at:
Why is there a discrepancy?
Réponse acceptée
MathWorks Support Team
le 29 Juil 2024
Modifié(e) : MathWorks Support Team
le 29 Août 2024
Int(f(x), x) in MATLAB does not explicitly include the +C (an arbitrary constant that must be included when integrating).
The output of the heavyside function is 0 if negative, 1 if positive. The output of the sign function is 1 if positive and -1 if negative. if you divide the sign function output range by two your possible results become [-1/2, 1/2].
Adding 1/2 to this set of possible answers produces [0, 1], identical outputs to the heavyside function. The 1/2 that we added is included in that implicit +C.
Please run the below command in the command window of installed MATLAB R2019a version to get release specific documentation on the implicit +C for the "dirac" function:
>> web(fullfile(docroot, 'symbolic/dirac.html'))
As we can see, in the context of integrals, the heavyside function and the sign function divided by 2 are equivalent when each has an arbitrary constant. These are both equally valid solutions.
Please follow the below link to search for the required information regarding the current release:
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Special Functions dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!