How do you plot a Dirac delta function?
Plot Dirac Delta Function
Declare a symbolic variable x and plot the symbolic expression dirac(x) by using fplot . To handle the infinity at x equal to 0 , use numeric values instead of symbolic values. Set the Inf value to 1 and plot the Dirac delta function by using stem .
What is the Dirac delta function used for?
What is the Dirac delta function in layman's terms? Loosely speaking it is a function with a spike at a particular value, and for which the area under the graph is unity. It can be regarded as saying that the probability that a variable has a particular value is 1, i.e. certainty.