MATLAB: C.T. signals convolution in Matlab

convolutionMATLABsymbolic

Hi, I have 2 continues time signals (exp decay & step), is it possible to convolute them in MATLAB?
I am working with symbolic variables ‘s’ and ‘t’ since I have obtained a transfer function H(s) analyticlay then converted it to h(t) using ilapalce() function, hence now I need to obtain y(t) where y(t) = h(t)*x(t). x(t) = u(t) a step input and h(t) = exp(-2 t) 4 – 4 exp(-t)
Thanks!
JS

Best Answer

One approach:
syms h(t) x(t) s t
Fcn1 = h(t) == exp(-2*t)*4 - 4*exp(-t);
Fcn2 = x(t) == heaviside(t);
convlap = laplace(Fcn1, t, s) * laplace(Fcn2, t, s);
Y(s) = simplify(rhs(convlap), 'Steps',250)
y(t) = ilaplace(Y, s, t)
Producing:
y(t) =
4*exp(-t) - 2*exp(-2*t) - 2