Hello,
I'm trying to check my work, but having problems with plotting in Mathematica... Until now i just used Heaviside[ ] function and did ok... but I can't get to plot Dirac... i tried to do it and just can't... please someone help
I'm trying to plot these signals....
and
Mathematica just shows the axes. There's no line or arrow or anything. Here's a method for plotting the DiracDelta as an arrow:
<<Graphics`Arrow`
PlotOne=Plot[DiracDelta[x-1],{x,0,2}]
PlotTwo=Show[Graphics[Arrow[{1,0},{1,1}]]]
Show[PlotOne,PlotTwo]
That will give you an arrow going from the point <1,0> to the point <1,1>, representing the delta function of "strength" 1.
If you wanted to generalize, you could let
MyDiracDelta[Strength_,a_]=Arrow[{a,0},{a,Strength}]
after loading the arrow package as shown above.
Then you could do
PlotOne=Plot[Strength DiracDelta[x-a],{x,a-1,a+1}]
PlotTwo=Show[Graphics[MyDiracDelta[Strength,a]]]
Show[PlotOne,PlotTwo]
and so on.
Hope that helps.