# convolution of two signals with different step responses [closed]

for the given signal h(n), is it 1 for n=0:149 or the n's of each is a different thing?

## closed as unclear what you're asking by Matt L., Marcus Müller, Dilip Sarwate, A_A, lennon310Jan 16 '18 at 12:46

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• I'm afraid this is a homework question with zero effort on the OP's side. – Matt L. Jan 15 '18 at 12:32

## 1 Answer

The n's represent samples because you are working with discrete signals. They are not all 1. For n=0:149 every sample is incremented by 1.If you write n=0:149 in MATLAB you will get a vector 1x150 with elements 0,1,2,3.....149. I recommend the book Digital Signal Processing Using MATLAB by Vinay K. Ingle and John G. Proakis

n = 0:149; %n = [0,1,2,3...149]
h = 3*(0.5).^n.*(stepfun(n,0)-stepfun(n,100))-2*(1/3).^n.*(stepfun(n,0)-stepfun(n,50));
x = stepfun(n,0)-stepfun(n,70);
y = conv(h,x);
stem(y);