Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have never used matlab before and just started working on my first exercise and don't have a clue what I am doing. I would appreciate any pointers to let me know if what I am doing is write or wrong.

The Question:
Generate and plot the following sequence. In each case the horizontal $(n)$ axis should extend only over the range indicated and should be labels accordingly. Each sequence should be displayed as a discrete-time signal using stem.

$x_1[n]=0.9\delta[n-5] \qquad 1\le n \le 20$

My answer:

EDU>> L=20;
EDU>> nn=0.9:(L-5);
EDU>> stem(nn);

Matlab stem plot

Is this even remotely correct?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Presumably $\delta$ refers to the Dirac delta function.

Try

L = 20;
x1 = zeros(1,L);
x1(5) = 0.9;
stem(x1);
share|improve this answer

Is $\delta[n]$ a discrete Dirac delta function, i would suppose that, if it does that is absolutely wrong, note that your function is a shifted-scaled version of the original sequence, so your function should be the $\delta[n]$ on 5 with a length of 0.9, If that is not your interpretation of $\delta[n]$, i think you should provide some definitions,. I am thinking and defining stuffs using DSP, digital filters notation

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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