I am trying to convolve two step function signals for school assignment the two signals are:
x(t) = (-t+3)(u(t)-u(t-3))
h(t) = 2u(t+2)-u(t+1)
I wrote the code below, when I ran the code I keep getting the "Error using plot
Vectors must be the same length.".the vector generated by the conv command is longer than the t vector!
any help will be appreciated.
dt=0.01; t= -7:dt:6;
x = 2*heaviside(t+2)-heaviside(t+1);
y= dt.* conv (x,h);
Name Size Bytes Class Attributes
dt 1x1 8 double
h 1x1301 10408 double
t 1x1301 10408 double
x 1x1301 10408 double
y 1x2601 20808 double
these are the values in my work space.