<< Chapter < Page Chapter >> Page >
  • a n ( u ( n ) - u ( n - 10 ) ) for n in [ - 20 , 20 ]

Repeat this procedure for the function

  • cos ( ω n ) a n u ( n ) for ω = π / 4 , and n in [ - 1 , 10 ]
The unit step function y = u(n) may be computed in Matlab using the command y = (n>=0) , where n is a vector of time indices.
Submit all three figures, for a total of 8 plots. Also submit the printouts of your Matlab .m-files.

Sampling

The word sampling refers to the conversion of a continuous-time signal into a discrete-time signal.The signal is converted by taking its value, or sample,at uniformly spaced points in time. The time between two consecutive samplesis called the sampling period . For example, a sampling period of 0.1 seconds implies thatthe value of the signal is stored every 0.1 seconds.

Consider the signal f ( t ) = sin ( 2 π t ) . We may form a discrete-time signal, x ( n ) , by sampling this signal with a period of T s . In this case,

x ( n ) = f ( T s n ) = sin ( 2 π T s n ) .

Use the stem command to plot the function f ( T s n ) defined above for the following values of T s and n . Use the subplot command to put all the plots in a single figure,and scale the plots properly with the axis command.

  1. T s = 1 / 10 , 0 n 100 ; axis([0,100,-1,1])
  2. T s = 1 / 3 , 0 n 30 ; axis([0,30,-1,1])
  3. T s = 1 / 2 , 0 n 20 ; axis([0,20,-1,1])
  4. T s = 10 / 9 , 0 n 9 ; axis([0,9,-1,1])
Submit a hardcopy of the figure containing all four subplots. Discuss your results.How does the sampled version of the signal with T s = 1 / 10 compare to those with T s = 1 / 3 , T s = 1 / 2 and T s = 10 / 9 ?

Random signals

For help on the Matlab random function, click here .

The objective of this section is to show how two signals that “look” similarcan be distinguished by computing their average over a large interval.This type of technique is used in signal demodulators todistinguish between the digits “1” and “0”.

Generate two discrete-time signals called “sig1” and “sig2” of length 1,000.The samples of “sig1” should be independent, Gaussian random variables with mean 0 and variance 1.The samples of “sig2” should be independent, Gaussian random variables with mean 0.2 and variance 1.Use the Matlab command random or randn to generate these signals, and then plot themon a single figure using the subplot command. (Recall that an alternative name for a Gaussian random variableis a normal random variable.)

Next form a new signal “ave1(n)” of length 1,000 such that “ave1(n)” is the average of the vector “sig1(1:n)”(the expression sig1(1:n) returns a vector containing the first n elements of “sig1”). Similarly, compute “ave2(n)” as the average of “sig2(1:n)”.Plot the signals “ave1(n)” and “ave2(n)” versus “n” on a single plot.Refer to help on the Matlab plot command for information on plotting multiple signals.

Submit your plot of the two signals “sig1” and “sig2”. Also submit your plot of the two signals “ave1” and “ave2”.Comment on how the average values changes with n . Also comment on how the average values can be usedto distinguish between random noise with different means.

2-d signals

For help on the following topics, click the corresponding link: Meshgrid Command , Mesh Command , and Displaying Images .

So far we have only considered 1-D signals such as speech signals.However, 2-D signals are also very important in digital signal processing.For example, the elevation at each point on a map, or the color at each point on a photograph areexamples of important 2-D signals. As in the 1-D case,we may distinguish between continuous-space and discrete-space signals.However in this section, we will restrict attention to discrete-space2-D signals.

When working with 2-D signals, we may choose to visualize them as images or as 2-D surfaces in a 3-D space.To demonstrate the differences between these two approaches, we will use two different display techniques in Matlab.Do the following:

  1. Use the meshgrid command to generate the discrete-space 2-D signal
    f ( m , n ) = 255 | sinc ( 0 . 2 m ) sin ( 0 . 2 n ) |
    for - 50 m 50 and - 50 n 50 . See the help on meshgrid if you're unfamiliar with its usage.
  2. Use the mesh command to display the signal as a surface plot.
  3. Display the signal as an image. Use the command colormap(gray(256)) just after issuing the image command to obtain a grayscale image.Read the help on image for more information.
Hand in hardcopies of your mesh plot and image. For which applications do you thinkthe surface plot works better? When would you prefer the image?

Questions & Answers

what is homeostasis?
Samuel Reply
what's physiology
AminchiSunday Reply
what is physiology
AminchiSunday
physically is the study of the function of the body
Najaatu
that is what I want ask
YAU
u are wright
YAU
pls what are the main treatment of hiccups
YAU
physiology is the study of the function of the body
Najaatu
hiccups happen when something irritates the nerves that course your diaphragm to contract
Najaatu
how did hypothalamus manege to control all activities of the various hormones
malual
how can I treat pain a patient feels after eating meals
Namuli Reply
how do I treat a three year old baby of skin infection?
Okocha Reply
It depends on the type of infection. Bacterial, fungal, parasitic or viral?
schler
if you can share the sign ad symptoms of the skin infection then u geh the treatment cox they're different sign ad symptoms of skin infection with different treatment
Sa
prostaglandin and fever
Maha Reply
yes
rayyanu
welcome sir
rayyanu
prostaglandin E2 is the final mediator.
Lemlem
prostaglandin E2 is the final mediator of fever.
Lemlem
yes
Agabi
good evening
Jediel
Discuss the differences between taste and flavor, including how other sensory inputs contribute to our  perception of flavor.
John Reply
taste refers to your understanding of the flavor . while flavor one The other hand is refers to sort of just a blend things.
Faith
While taste primarily relies on our taste buds, flavor involves a complex interplay between taste and aroma
Kamara
which drugs can we use for ulcers
Ummi Reply
omeprazole
Kamara
what
Renee
what is this
Renee
is a drug
Kamara
of anti-ulcer
Kamara
Omeprazole Cimetidine / Tagament For the complicated once ulcer - kit
Patrick
what is the function of lymphatic system
Nency Reply
Not really sure
Eli
to drain extracellular fluid all over the body.
asegid
The lymphatic system plays several crucial roles in the human body, functioning as a key component of the immune system and contributing to the maintenance of fluid balance. Its main functions include: 1. Immune Response: The lymphatic system produces and transports lymphocytes, which are a type of
asegid
to transport fluids fats proteins and lymphocytes to the blood stream as lymph
Adama
what is anatomy
Oyindarmola Reply
Anatomy is the identification and description of the structures of living things
Kamara
what's the difference between anatomy and physiology
Oyerinde Reply
Anatomy is the study of the structure of the body, while physiology is the study of the function of the body. Anatomy looks at the body's organs and systems, while physiology looks at how those organs and systems work together to keep the body functioning.
AI-Robot
what is enzymes all about?
Mohammed Reply
Enzymes are proteins that help speed up chemical reactions in our bodies. Enzymes are essential for digestion, liver function and much more. Too much or too little of a certain enzyme can cause health problems
Kamara
yes
Prince
how does the stomach protect itself from the damaging effects of HCl
Wulku Reply
little girl okay how does the stomach protect itself from the damaging effect of HCL
Wulku
it is because of the enzyme that the stomach produce that help the stomach from the damaging effect of HCL
Kamara
function of digestive system
Ali Reply
function of digestive
Ali
the diagram of the lungs
Adaeze Reply
what is the normal body temperature
Diya Reply
37 degrees selcius
Xolo
37°c
Stephanie
please why 37 degree selcius normal temperature
Mark
36.5
Simon
37°c
Iyogho
the normal temperature is 37°c or 98.6 °Fahrenheit is important for maintaining the homeostasis in the body the body regular this temperature through the process called thermoregulation which involves brain skin muscle and other organ working together to maintain stable internal temperature
Stephanie
37A c
Wulku
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Purdue digital signal processing labs (ece 438). OpenStax CNX. Sep 14, 2009 Download for free at http://cnx.org/content/col10593/1.4
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Purdue digital signal processing labs (ece 438)' conversation and receive update notifications?

Ask