DSP Signal Sketching

Thread Starter

naickej4

Joined Jul 12, 2015
206
Hello Again,

Please can you check my work.

Question
x[n] = {6,4,1,1}. Sketch the signal g[n] = x[-n+1]


Please find the attached screen shot of my full working and sketch. (Please forgive me camera quality of my phone).

Thank you.

upload_2016-10-22_15-4-19.png
 

Papabravo

Joined Feb 24, 2006
22,083
for n = {0, 1, 2, 3}
n+1 will be {1, 2, 3, 4}
-n+1 will be {1, 0, -1, -2}

Your second sketch appears to be shifted the wrong way.
 

Thread Starter

naickej4

Joined Jul 12, 2015
206
for n = {0, 1, 2, 3}
n+1 will be {1, 2, 3, 4}
-n+1 will be {1, 0, -1, -2}

Your second sketch appears to be shifted the wrong way.
Hi Sir, Thanks very much I always forget that if we add (n+1) its a delay, am I correct in saying that so the plots will shift the right?

How can I check my answer in this type of questions?

thank you.
 

MrAl

Joined Jun 17, 2014
13,707
Hi there,

Try graphing g[n]=x[-n] first see if that helps. Note this is to verify, i am not saying yet if i think your previous result was right or wrong.

Here's a quick table that might help too. Note the first row is n and the columns line up with the results for x[n], and where there are no results shown for the row x[n] in the image attachment they are all zero:

Code:
[FONT=Courier New]
     n=  -6,-5,-4,-3,-2,-1, 0, 1, 2, 3, 4, 5, 6
  x[n]=   0, 0, 0, 0, 0, 0, 6, 4, 1, 1, 0, 0, 0
x[-n]=
x[n+1]=
x[n-1]=
[/FONT]

Just for reference, the -n line would read:
6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6

The line for n-1 would read:
-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5

and now all you have to do is line up the original values with the new 'n' to immediately see the results, then refer back to the line with the original 'n'.

Just in case the formatting in that 'code' block does not show up right, here is an image instead (not showing all the zeros):
 

Attachments

Last edited:

Thread Starter

naickej4

Joined Jul 12, 2015
206
Hi Sir.
Ok it makes more sense now. So for [n+1] at -1 it will give me zero, because -1+1 ,so i take the value of what is zero in the original signal n and that is the longest plot which is 6.
So all go to the left? Is my logic correct?

Thank you very much
 

MrAl

Joined Jun 17, 2014
13,707
Hi Sir.
Ok it makes more sense now. So for [n+1] at -1 it will give me zero, because -1+1 ,so i take the value of what is zero in the original signal n and that is the longest plot which is 6.
So all go to the left? Is my logic correct?

Thank you very much
Hi,

You're welcome :)

For m=n+1, when n=-1 we have m=0, and looking back at the original sequence we see that x[0]=6, but n=-1. So 6 must appear in the new graph above n=-1 now. So x[0] in the old sequence must become x[-1] in the new sequence, so for n=-1 we must see a value of 6 graphed.

Checking, x[n+1] for n=-1 is x[-1+1]=x[0]=6 so it looks good.
So we must get all the original values back at the original locations once we read the new graph values and their 'n' axis locations and apply the shift.

Just to recap a little, we have n and n+1 and n-1 as:
0,1,2,3,4,5 (n)
1,2,3,4,5,6 (n+1)
-1,0,1,2,3,4,5 (n-1)

so when n=0 then m=n+1=1, and the value at m=n=1 was 4, but since n is zero we have to graph that 4 at the original graph's n=0.
As you can see there is a little juxtaposition going on so it helps to make a little table. The table helps to relate the values of old n, new n, and new and old x to the actual positions in the new graph.
 
Last edited:

Thread Starter

naickej4

Joined Jul 12, 2015
206
Wow so that makes my final plot correct. Thank you MrAI you are a great teacher. Much appreciated. So I understand this section fairly well now.
Thank you.
 

MrAl

Joined Jun 17, 2014
13,707
Hi again,

You're welcome :)

I already made this next drawing so here is another image you can reference. It shows the tables for x[n], x[-n], x[n+1], x[n-1] for a slightly different problem.
Note all i did was first enter the 'n', then calculate the new 'n' such as n+1, then just go back to the line with x[n] and grab those values and stick them under the n+1 line under the same number as the original 'n', and then when it is graphed we refer back to the line 'n' and plot those values that came out in the new locations.
Again i did not show all the zeros for clarity, but in the last example for x[n-1] we'd have to show the new sequence as {0,9,7,8} when the original was {9,7,8} because this system is zero based. In the new plot of course for the new 0 we would have to also plot 0.


Samples_20161023_101656.gif
 
Last edited:

MrAl

Joined Jun 17, 2014
13,707
Hello again,

Ok great, but i realized i did not show the example for x[-n+1] yet as that was your main question so i made another drawing that shows that as well, and also showing the graphs for each example. You might want to check them over to make sure they are all correct :)

Graphs-1.gif
 

MrAl

Joined Jun 17, 2014
13,707
Hi Sir. Thank you. This is over cool. How did u plot this? What software?

Hi,

I just used MS Paint really, and copied the text from my text editor where i had typed in the numerical solutions, then made a blank grid and numbered the bottom and side, then copy and pasted that 4 more times, then drew those lolly pop looking sample sticks, then copy and pasted those sticks 4 more times either as is and shifted or rotated horizontally and then pasted to get the reversed sequences.
It takes a little time but not exceptionally long because most of it is just copy and rotating and pasting.
The hardest part is lining up the 'lolly pops' with the grid lines. Takes some care and some zooming in to get it right.
I use another drawing program once in a while too which is similar to MS Paint, but it's basically the same thing.

Now that you mentioned this though maybe i should write some software to plot the sequences as that would make it much easier and faster, taking a few seconds to complete. I'll have to think on this. The plots themselves are much simpler than most plots because they only require drawing those stick figures in the right places.
 
Last edited:
Top