0
$\begingroup$

$(n+5)u[n+5]+2nu[n]+(n-10)u[n-10]$ is the question.

The $u[n]$ is messing me up. If I substitute $n$ as $0$, what would be $u[5]$ or $u[-10]$?

$\endgroup$
6
  • $\begingroup$ sorry, I should have used (). $\endgroup$
    – Celaena
    Sep 7, 2017 at 6:52
  • $\begingroup$ Nothing bad happened :) thanks for clarifying :) $\endgroup$ Sep 7, 2017 at 6:54
  • $\begingroup$ so, $u$ is the unit step function, right? $\endgroup$ Sep 7, 2017 at 6:55
  • $\begingroup$ yep it is and thanks for editing, I had no clue! $\endgroup$
    – Celaena
    Sep 7, 2017 at 6:56
  • 2
    $\begingroup$ then, what I'd do now is simply draw the three parts of your sum (the one with $u[n+5]$, the one with $u[n]$ and the one with $u[n-10]$) separately in three graphs right below each other, then add them up. Hint: what is the lowest $n$ for which any of these three change, what is the highest? $\endgroup$ Sep 7, 2017 at 6:58

2 Answers 2

1
$\begingroup$

Begin with defining the base signal as $x[n] = n ~u[n]$ and recognize the output as a linear compositions (superpositions) of the base signal as: $$y[n] = x[n+5] + 2 x[n] + x[n-10]$$

Now what you have to answer is the result of translations and scalings applied on the basic signal $x[n]$. This ability is a simple yet an indispensibly necessary skill for a clear understanding and successful applications of all subsequent signal processing theory. Therefore you must train yourself enough for this task.

Incidentally, the signal $x[n+5]$ is an advanced (shift left) version of $x[n]$ whereas $x[n-10]$ is a delayed (shift right) version.

Graphically the result is obtained by summing the three components drawn on the on the same plot. A more detailed approach would use the piecewise definitions of the components to define the sum. It would proceed as follows:

Let $x[n]$be defined as: $$ x[n] = n ~\text{u}[n] = \begin{cases} n , \text{ for } n \geq 0 \\ 0 , \text{ for } n < 0 \\ \end{cases} $$

Then you can define the three superposed signals as:

$$ \begin{align} x_1[n] = x[n+5] = (n+5) ~u[n+5] &= \begin{cases} n+5, &\text{ for } &n+5\geq 0 \\ 0, &\text{ for } &n+5< 0 \\ \end{cases} \\ x_2[n] = 2x[n] = 2n ~u[n] &= \begin{cases} 2n,~~~~ &\text{ for } &2n \geq 0 \\ 0,~~~ &\text{ for } &2n < 0 \\ \end{cases} \\ x_3[n] = x[n-10] = (n-10) ~u[n-10] &= \begin{cases} n-10, &\text{for} &n-10 \geq 0 \\0, &\text{for} &n-10<0 \\ \end{cases} \\ \end{align} $$

Modifiy the intervals: $$ \begin{align} x_1[n] = x[n+5] = (n+5) ~u[n+5] &= \begin{cases} n+5, &\text{ for } &n \geq -5 \\ 0, &\text{ for } &n<-5 \\ \end{cases} \\ x_2[n] = 2x[n] = 2n ~u[n] &= \begin{cases} 2n,~~~~ &\text{ for } &n \geq 0 \\ 0,~~~ &\text{ for } &n<0 \\ \end{cases} \\ x_3[n] = x[n-10] = (n-10) ~u[n-10] &= \begin{cases} n-10, &\text{for} &n \geq 10 \\0, &\text{for} &n<10 \\ \end{cases} \\ \end{align} $$

Therefore $y[n] = x_1[n] + x_2[n] + x_3[n]$ is: $$ y[n] = \begin{cases} 0 , &\text{ for } &-\infty<n<-5 \\ n+5 , &\text{ for } &-5 \leq n <0 \\ 3n+5 , &\text{ for } &0 \leq n <10 \\ 4n-5 , &\text{ for } &10 \leq n <\infty \\ \end{cases} $$

$\endgroup$
1
$\begingroup$

I don't know did you by plotting also meant a MATLAB plot but it's a good way for checking your results if you're unsure. For discrete signals you can use the stem plot:

n = [-12:1:12];
f =(n+5).*stepfun(n,-5)+2*n.*stepfun(n,0)+(n-10).*stepfun(n,10);
stem(n,f,'marker','o','color','r')
grid on;

enter image description here

From the plot you can see that e.g. for n=10 the y-axis shows 35 which you will get by inserting n=10 into y[n]=3n+5 provided by Fat32 which confirms his results.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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