1
$\begingroup$

enter image description here

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.

Answer: enter image description here

$\endgroup$
  • 1
    $\begingroup$ what do you mean with "solve it"? There's nothing to be solved here; it's an equation that gives you $x_1$. $\endgroup$ – Marcus Müller Jan 14 '18 at 16:41
  • $\begingroup$ I cannot understand how this equation can be written in matlab, that's what I mean by "solve it". $\endgroup$ – agelosnm Jan 14 '18 at 16:44
  • $\begingroup$ 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 $\endgroup$ – Laurent Duval Jan 14 '18 at 16:49
  • 1
    $\begingroup$ @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. :) $\endgroup$ – agelosnm Jan 14 '18 at 16:52
  • 1
    $\begingroup$ Good, please append you final solution when you get it $\endgroup$ – Laurent Duval Jan 14 '18 at 16:58
0
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ I think the matlab code for this is the following: clear,clc n=-10:10; x=zeros(1,length(n)); x(11:12)=1; x(13)=2; x(14:15)=1; stem(n,x) $\endgroup$ – agelosnm Jan 14 '18 at 17:26
  • $\begingroup$ I'd suggest you happen it with a plot to your question, at the end. $\endgroup$ – Laurent Duval Jan 14 '18 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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