1
$\begingroup$

This question already has an answer here:

I am using this function to plot

Plot[2*DiracDelta[t + 3], {t, -3.09, -2.99}, PlotStyle -> Thick, 
 AxesLabel -> {t, x[t]}, PlotLegends -> "Expressions", 
 Filling -> Axis]

but in the plot it's hard to see where it is.

enter image description here

So maybe there is a function to use, but I couldn't find it.

$\endgroup$

marked as duplicate by MarcoB, Community Feb 7 '16 at 23:51

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – Michael E2 Feb 7 '16 at 23:24
1
$\begingroup$

A plot of DiracDelta is at best an approximation to the behavior of the underlying mathematical construct. This has been discussed before on this site; see for instance Calling Correct Function for Plotting DiracDelta and the answers within.

In your case, you could perhaps try the following:

ListLinePlot[
 Table[{x, Piecewise[{{1, x == -3}, {0, True}}, x]}, {x, -4, -2, 0.001}]
]

Mathematica graphics

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.