<< 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

how to create a software using Android phone
Wiseman Reply
how
basra
what is the difference between C and C++.
Yan Reply
what is software
Sami Reply
software is a instructions like programs
Shambhu
what is the difference between C and C++.
Yan
yes, how?
Hayder
what is software engineering
Ahmad
software engineering is a the branch of computer science deals with the design,development, testing and maintenance of software applications.
Hayder
who is best bw software engineering and cyber security
Ahmad
Both software engineering and cybersecurity offer exciting career prospects, but your choice ultimately depends on your interests and skills. If you enjoy problem-solving, programming, and designing software syste
Hayder
what's software processes
Ntege Reply
I haven't started reading yet. by device (hardware) or for improving design Lol? Here. Requirement, Design, Implementation, Verification, Maintenance.
Vernon
I can give you a more valid answer by 5:00 By the way gm.
Vernon
it is all about designing,developing, testing, implementing and maintaining of software systems.
Ehenew
hello assalamualaikum
Sami
My name M Sami I m 2nd year student
Sami
what is the specific IDE for flutter programs?
Mwami Reply
jegudgdtgd my Name my Name is M and I have been talking about iey my papa john's university of washington post I tagged I will be in
Mwaqas Reply
yes
usman
how disign photo
atul Reply
hlo
Navya
hi
Michael
yes
Subhan
Show the necessary steps with description in resource monitoring process (CPU,memory,disk and network)
samuel Reply
What is software engineering
Tafadzwa Reply
Software engineering is a branch of computer science directed to writing programs to develop Softwares that can drive or enable the functionality of some hardwares like phone , automobile and others
kelvin
if any requirement engineer is gathering requirements from client and after getting he/she Analyze them this process is called
Alqa Reply
The following text is encoded in base 64. Ik5ldmVyIHRydXN0IGEgY29tcHV0ZXIgeW91IGNhbid0IHRocm93IG91dCBhIHdpbmRvdyIgLSBTdGV2ZSBXb3puaWFr Decode it, and paste the decoded text here
Julian Reply
what to do you mean
Vincent
hello
ALI
how are you ?
ALI
What is the command to list the contents of a directory in Unix and Unix-like operating systems
George Reply
how can i make my own software free of cost
Faizan Reply
like how
usman
hi
Hayder
The name of the author of our software engineering book is Ian Sommerville.
Doha Reply
what is software
Sampson Reply
the set of intruction given to the computer to perform a task
Noor
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