# understanding a signal from its mathematical formula

I can understand from unit step function in the end of the equation that $n=[3 \quad4]$, but I cannot understand how delta function affects the signal in order to solve it and put it on matlab.

• what do you mean with "solve it"? There's nothing to be solved here; it's an equation that gives you $x_1$. – Marcus Müller Jan 14 '18 at 16:41
• I cannot understand how this equation can be written in matlab, that's what I mean by "solve it". – agelosnm Jan 14 '18 at 16:44
• You cannot directly write it in Matlab, because of the infinite sums. However, you can plot the resulting signal in Matlab, guessing the values of $x_1$ for all $n$s – Laurent Duval Jan 14 '18 at 16:49
• @LaurentDuval I know I cannot write it directly, I just couldn't think how I could do it. Βasically, how to make it to a form that can be written in matlab. Your answer made it very clear to me though. :) – agelosnm Jan 14 '18 at 16:52
• Good, please append you final solution when you get it – Laurent Duval Jan 14 '18 at 16:58

What is misleading is that you ought to find the values of $x_1[n]$ for all $n$.
For the first term, assuming convention $\cdot^0=1$, you get $\delta[n]+\delta[n-2]$. For the second one, all terms except for $k=2$ cancel each other, so you only gain another $\delta[n-2]$. Then, as you guessed, the last term (without the initial minus sign), is 1 for $n=3,4$, and zero elsewhere.