Digital Signal Processing Reference
In-Depth Information
for i=1:length(X)
if (real(X(i)) > 0)
phase(i) = atan(imag(X(i)) / real(X(i)));
elseif (real(X(i)) < 0)
% Add to +/- pi, depending on quadrant of the point
if (imag(X(i)) < 0) % then we are in quadrant 3
phase(i) = -pi + atan(imag(X(i)) / real(X(i)));
else
% we are in quadrant 2
phase(i) = pi + atan(imag(X(i)) / real(X(i)));
end
else
% If real part is 0, then it lies on the + or - y-axis
% depending on the sign of the imaginary part
phase(i) = sign(imag(X(i)))*pi/2;
end
end
1.2
What Is a Signal?
A signal is a varying phenomenon that can be measured. It is often a physical
quantity that varies with time, though it could vary with another parameter, such
as space. Examples include sound (or more precisely, acoustical pressure), a voltage
(such as the voltage dierences produced by a microphone), radar, and images trans-
mitted by a video camera. Temperature is another example of a signal. Measured
every hour, the temperature will uctuate, typically going from a cold value (in the
early morning) to a warmer one (late morning), to an even warmer one (afternoon),
to a cooler one (evening) and nally a cold value again at night. Often, we must
examine the signal over a period of time. For example, if you are planning to travel
to a distant city, the city's average temperature may give you a rough idea of what
clothes to pack. But if you look at how the temperature changes over a day, it will
let you know whether or not you need to bring a jacket.
Signals may include error due to limitations of the measuring device, or due to
the environment. For example, a temperature sensor may be aected by wind chill.
At best, signals represented by a computer are good approximations of the original
physical processes.
Some real signals can be measured continuously, such as the temperature. No
matter what time you look at a thermometer, it will give a reading, even if the
time between the readings is arbitrarily small. We can record the temperature at
intervals of every second, every minute, every hour, etc. Once we have recorded these
Search WWH ::




Custom Search