enter image description here

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

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

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);
| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.