MATLAB: Am I not getting the correct Laplace Transform of a Heaviside step function

assumeheavisidelaplaceSymbolic Math Toolbox

Best Answer

This is the expected behavior because the Laplace Transform of the Heaviside step function depends on whether a > 0 or a < 0.

For a > 0: laplace(heaviside(t-a)) = exp(-a*s)/s

For a < 0: laplace(heaviside(t-a)) = 1/s

In order to get the desired output, specify the assumption for the variable "a":

>> syms a t
>> assume(a > 0);
>> laplace(heaviside(t-a))
ans =
exp(-a*s)/s