Since the unit step functrion is defined as being equal to 1 for , I would use: Ustp0 = @(t) (t >= 0);
Ustp1 = @(t) 0.5*(t == 0) + 1*(t > 0);
Plotting the unit step funcitons themselves:
t = -2: 0.1: 2;
figure
subplot(2,1,1)
plot(t, Ustp0(t))
ylim([-0.1 1.1])
subplot(2,1,2)
plot(t, Ustp1(t))
ylim([-0.1 1.1])
So use those to create your function, and and go from there.
I leave the rest to you.
Best Answer