Recall that a
discrete-time signal is a
function with an integer-valued independent variable
. The variable
marches through time from negative infinity to positive infinity. For each value of
, we get the value of from our function
.
Now, that
is either going to be a real number, meaning it's going to live in the real number set, or it's going to be a complex number and live in the complex number set.
Plotting real signals
We're going to see a lot graphs like these in our study of signal processing:
For each value of one of these
, we get the value of
.
For clarity, we're often going to color in these circles at the top, but that's really just a matter of taste. We're either going to label the signal on the y-axis or in the title of the graph.When it's clear from context that we're dealing with a discrete index
, we can strip away all of the labels and axes and just plot signals like this, just because it's cleaner for some applications:
Examples of discrete-time signal plots
Here are some examples of signals. The first is a financial time series. It's the daily closing share price of Google for a five-month period:
You can see here that it's a discrete time signal, where
each of these signal points corresponds to one single shareprice at the end of a day. There are some fluctuations in the price, and if you were a financial trader or if you were an economist, you would be very interested in the information
that this daily share price closing signal conveys.Another example is a temperature signal,the temperature at Houston Intercontinental Airport every day at noon for 365 days that comprise the year 2013 (in degrees Celsius):
Again, we can see that there are fluctuations in this signal, and if you were a meteorologist or a climatologist, you'd be very interested in the information that this signal conveys. Finally, here's an audio signal that is speech from an actor speaking a part in Shakespeare's play, Hamlet:
Plotting discrete-time signals correctly
We need to remember that with a discrete-time signal, the independent variable is integer valued. This means that when you plot a signal in a program like MATLAB, you must use a discrete-time plotting function
(like the
stem function) that respects the fact that the signal is only defined at discrete time points, rather than a function (like
plot ) which interpolates between points:
Plotting complex-valued signals
Up to this point, we've been talking about real-valued signals. They comprise a single plot of
versus
. But what about complex-valued signals?
Recall that a complex number has a real component and an imaginary component. There are two equivalent ways of expressing a given complex number. For some
, we can express
in two different ways:
Cartesian/rectangular form:
Polar form:
,
where
(in engineering contexts the variable
is used to represent this value because
represents electrical current). Just as a complex number can be expressed in two different ways, so can a complex-valued signal:
Cartesian/rectangular form:
Polar form:
What this means is that, if we're plotting a complex-valued signal, we actually need two plots. As we have seen, there are two different ways we can plot the same complex-valued signal: