Confusion with a function transformation

82 Views Asked by At

I got a HW problem wrong in my Signals and Systems class and am hoping someone can help me understand why.

There's a discrete-time signal x[n] = u[n] + 2u[n-3] - 3u[n-6], where u[n] is the discrete-time unit step. The problem said to first draw this function, then draw the function transformation x[4n+1].

I drew the original function x[n] correctly, but got the transformation x[4n+1] wrong. I thought I should follow the order of operations, so first I compressed the signal by 4, and then I shifted it to the left by 1. Apparently I was supposed to shift it first, then compress it to get the correct answer. So my question is, why does this not follow the order of operations?

2

There are 2 best solutions below

0
On BEST ANSWER

If you write $x[4n+1] = x\left[4\left(n+\frac{1}{4}\right)\right]$, you would see more clearly which is the correct sequence of operations.

To better understand this, let $y_1[n] = \mathcal{T}_1\{x[n]\} = x[4n]$ be the output of a system that downsamples its input by a factor of 4, and $y_2[n] = \mathcal{T}_2\{x[n]\}=x[n+1]$ be the output of a system that advance its input by 1. So, if we enter $x[n]$ to $\mathcal{T}_1$, we get $y_1[n] = x[4n]$, and if we then enter $y_1[n]$ to $\mathcal{T}_2$, then we get $y_2[n] = y_1[n+1] = x[4(n+1)] = x[4n+4]$.

0
On

It might be easier to understand if we write the scaling and translation in two steps.

To that end, suppose the $f(n)$ is a given function. Then for two numbers $a$ and $b$, we define $g(n)$ as the function given by $$g(n)=f(an)$$ and $h(n)$ as the function given by

$$\begin{align} h(n)&=g(n+b/a)\\\\ &=f\left(a(n+b/a)\right) \tag 1\\\\ &=f(an+b) \end{align}$$

Now, let's see what happens upon evaluating these functions at various integer values of $n$.

For $n=0$, $h(0)=g(b/a)=f\left(a(0+b/a)\right)=f(b)$.

For $n=1$, $h(1)=g(1+b/a)=f\left(a(1+b/a)\right)=f(a+b)$.

For $n=2$, $h(2)=g(2+b/a)=f\left(a(2+b/a)\right)=f(2a+b)$.

We see now that $h$ is a transformed image of $f$ in which we first translate $f$ to the "left" by $b/a$ and then "compress" by a scale factor of $a$.

This is different from first compressing by the factor $a$ and then translating by $b/a$. In this case, we would obtain $f(an+b/a)\ne f(an+b)$.