MATLAB: How to create a unit step function u(t) in symbolic function form

symsunit step function

Hi,
I have an homework in which a part includes a function which is applied to an LTI system. The problem is, the function is desired to be defined as a symbolic function and I did that part easily but it is multiplied with the unit step function u(t) and problem begins here. Normally, I define the unit step with a loop or a simple statement like unitstepsignal = t>=0; but this statement does not respond to the calculation and loops does not respond as well since MATLAB cannot convert symbolic to logical and gives the error message "Conversion to logical from sym is not possible.". I tried the heaviside function but it turns 1/2 when t=0 yet I need 1 for t=0. That is why, it is not useful for the current situation. I'm adding the part that I need and I left unitstepsignal as how it is because I'm really tired of trying. So, thanks in advance for your help about defining u(t).
syms x(t)
syms h(t)
x(t)=44.*exp(3.27.*t).*unitstepsignal; %unitstepsignal is u(t) but I could not define it as symbolic.
h(t)=0.5.*44.*exp(0.5.*3.27.*t).*unitstepsignal;

Best Answer

Use the heaviside function.