I think you mean
and not dirac(t,2)
There is a function in Symbolic Toolbox called dirac() that takes the following syntax
where n is the order of the derivative. Of course derivative is understood here in the sense of distributions.
So dirac(2,t) is the 2nd derivative of the Dirac distribution with respect to the variable t.
See the reference page: