Can I modify y[n] = αy[n-1] + x[n] the same way I would do it with y(k) --> Y(z)? I need H(z), but I don't know what is the difference between using (k), and (n). I often encountered [k] notation, what is the difference between (k) and [k]?

  • 4
    $\begingroup$ Usually square brackets are used to indicate that the index is discrete, but conventions vary. $\endgroup$ – MBaz Jul 4 '19 at 17:34
  • $\begingroup$ Ok, thanks. I'm thinking, maybe [n] would mean that the series is 0 when n<0, and some function f, f(n) when n>0? And h[k] could be positive or negative where ever. Would that make sense? $\endgroup$ – Immo Jul 4 '19 at 17:43
  • $\begingroup$ Could be, but that's not an universal convention. $\endgroup$ – MBaz Jul 4 '19 at 17:45
  • $\begingroup$ Your recursive relaton seems akin to first order exponential averaging low-pass filter, or exponentially weighted moving average (EWMA) see dsp.stackexchange.com/q/36415/15892 or first order exponential averaging low-pass filter, exponentially weighted moving average (EWMA) $\endgroup$ – Laurent Duval Jul 4 '19 at 19:12

The notation for discrete-time signals, $x[n]$, was first noticed by me in the original Oppenheim and Schaffer (1975), even though i didn't see that book until 1981.

enter image description here

So before, discrete-time signals in DSP used the same notation in mathematics used for sequences (infinite or not), with the subscript, $x_n$. In both notations, the argument or subscript play the same role and are only integers.

$$ x[n] \triangleq x_n \qquad \qquad x\in\mathbb{C} \qquad n\in\mathbb{Z} $$

Usually the signal, $x[n]$, is real but it need not be. But the argument, $n$, must be an integer which makes this no different than a sequence, $x_n$.

With the DTFT and DFT this notation was common pre-O&S,

$$\begin{align} X_k &\triangleq \sum\limits_{n=0}^{N-1} x_n e^{-i 2 \pi \frac{nk}{N}} \\ \\ x_n &= \frac{1}{N} \sum\limits_{k=0}^{N-1} X_k e^{+i 2 \pi \frac{nk}{N}} \\ \end{align}$$

or they would use that awful $W_N^{nk}$ notation.

Now the problem with the "$x_n$" notation is that you would get too many subscripts to deal with, if you had a signal that was a multi-element vector. And there was nothing in the notation to denote which subscript was the "time-like" variable. With analog signals, $v(t)$, this wasn't a problem. If you had a cable with 8 wires (plus ground), you could label them "$v_1(t)$" to "$v_8(t)$" and looking at $v_m(t)$, there was no doubt that it meant the "$m$th element that is a function of time, $t$." But with "$x_{m,n}$" (as opposed to the O&S way "$x_m[n]$") there is nothing, other than order, differentiating discrete time from the "channel" number. Add another dimension (such as the 2-dim pixel radiance as a function of time) and you have a worser mess:

$$ x_{r,c}[n] \qquad \text{vs.} \qquad x_{r,c,n} $$

$r$ is row number, $c$ is column number, and $n$ is discrete-time.

So with this notation, there is a parity between a vector of continuous-time (a.k.a. "analog") signals $x_m(t)$ and discrete-time (a.k.a. "digital") signals $x_m[n]$. So, likely, whatever relationship one might see between the various analog signals $x_m(t)$ in a multi-conductor cable, I might expect to see between the various elements of the digital vector signal $x_m[n]$ and sampling would be no different than with a single-dimensional signal

$$ x_m[n] \triangleq x_m(t)\bigg|_{t=nT} \qquad \qquad T=\frac{1}{f_\mathrm{s}} $$

So this provides for a consistency of notation along with a way to differentiate arguments that must be integers whereas whatever is contained within parenths $f\big( \cdot \big)$ is considered to have no such restriction (could be a real or complex argument). That is, to me, helpful.

So, if it's a very old DSP paper (pre-1978, perhaps), the notation you would see would almost certainly be $x_n$ for discrete-time signals and the DFT would be $X_k$ for discrete-frequency. But this has evolved to

$$\begin{align} X[k] &\triangleq \sum\limits_{n=0}^{N-1} x[n] e^{-j 2 \pi \frac{nk}{N}} \\ \\ x[n] &= \frac{1}{N} \sum\limits_{k=0}^{N-1} X[k] e^{+j 2 \pi \frac{nk}{N}} \\ \end{align}$$

and EEs will use "$j$", instead of "$i$" for the imaginary unit.

Math folks might use this notation:

$$\begin{align} \hat{f}_k &\triangleq \frac{1}{\sqrt{n}} \sum\limits_{j=0}^{n-1} f_j \, e^{-i 2 \pi \frac{jk}{n}} \\ \\ f_j &= \frac{1}{\sqrt{n}} \sum\limits_{k=0}^{n-1} \hat{f}_k \, e^{+i 2 \pi \frac{jk}{n}} \\ \end{align}$$

| improve this answer | |
  • 1
    $\begingroup$ You should really put commas in your multiple subscripts to distinguish them from products. $\endgroup$ – Cedron Dawg Jul 7 '19 at 2:54
  • 1
    $\begingroup$ let's just say that subscripts are not always identical to a discrete argument in square brackets. i don't mind seeing math in the argument of a continuous-time or discrete-time functions. i.e. $$ x\big[\lfloor t/T \rfloor\big] $$ but i don't wanna see math done in the actual subscripts. they should simply be integers (or integer variables) and nothing else. $\endgroup$ – robert bristow-johnson Jul 7 '19 at 3:00
  • 1
    $\begingroup$ So says the man who laid down $c_{N/2}$ just yesterday. Tee-hee. Anyway, something like $Y_{2n}$ is much clearer as $Y_{2,n}$ if that is what is really meant. Crufty or crafty, you decide. Oh, and I'm not going to get into a long discussion about this in comments, either. ;-) $\endgroup$ – Cedron Dawg Jul 7 '19 at 3:21
  • 1
    $\begingroup$ aw, you're right. what can i say? $\endgroup$ – robert bristow-johnson Jul 7 '19 at 3:26
  • 1
    $\begingroup$ "Thanks for the upvote"? $\endgroup$ – Cedron Dawg Jul 7 '19 at 3:40

Based on Electrical Engineering use of DSP notation,

  • $y(k)$ indicates a continous argument function $y(\cdot)$ evaluated at an integer argument $k$ (letters $i,j,k,l,m,n$ are preferred for integer variables, unless otherwise explicitly stated)

  • $y[n]$ indicates a discrete argument function, a sequence, $y[\cdot]$ evaluated at its integer index $n$. Mathematically, this can be considered as the $n+1$ st element of the sequence $y[n]$ (assuming $n$ starts from $0$), but that's not the case in DSP as integer $n$ ranges from $-\infty$ to $\infty$.

| improve this answer | |
  • $\begingroup$ @robertbristow-johnson hmm what's the common convention ? Do I know it too ? may be you should edit... $\endgroup$ – Fat32 Jul 6 '19 at 20:18
  • $\begingroup$ what i meant by the common mathematical convention is $y_n$ instead of $y[k]$ or $y(n)$. $\endgroup$ – robert bristow-johnson Jul 7 '19 at 4:02
  • $\begingroup$ @robertbristow-johnson your answer is more complete and historically relevant of course. I assumed no comprehensive treatment of mathematical subscript and superscript notation and its link to premature DSP; which is merely a convention. The question was about y(k) and y[n] and I just left it there... Still many authors (especially in Probability, Statistics, Information Theory, Coding, Communication etc), prefer $x_n$ instead of $x[n]$ to refer to the elements of a vector / sequence. As long as clear from the context (which should be) then there's no problem to use any convention. $\endgroup$ – Fat32 Jul 7 '19 at 10:55
  • 1
    $\begingroup$ A small observation that helps me distinguish the usage case is that parentheses symbol ( ) is curved, and 'continuous' in shape, while brackets [ ] are sharp-edged, for 'discrete' function mapping. $\endgroup$ – Bryan W Jan 27 at 5:57
  • 1
    $\begingroup$ @BryanW yes that's (possibly) the very reason of selecting $[~]$ for discrete time sequences... $\endgroup$ – Fat32 Jan 27 at 19:06

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.