<< 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 defense mechanism
Chinaza Reply
what is defense mechanisms
Chinaza
I'm interested in biological psychology and cognitive psychology
Tanya Reply
what does preconceived mean
sammie Reply
physiological Psychology
Nwosu Reply
How can I develope my cognitive domain
Amanyire Reply
why is communication effective
Dakolo Reply
Communication is effective because it allows individuals to share ideas, thoughts, and information with others.
effective communication can lead to improved outcomes in various settings, including personal relationships, business environments, and educational settings. By communicating effectively, individuals can negotiate effectively, solve problems collaboratively, and work towards common goals.
it starts up serve and return practice/assessments.it helps find voice talking therapy also assessments through relaxed conversation.
miss
Every time someone flushes a toilet in the apartment building, the person begins to jumb back automatically after hearing the flush, before the water temperature changes. Identify the types of learning, if it is classical conditioning identify the NS, UCS, CS and CR. If it is operant conditioning, identify the type of consequence positive reinforcement, negative reinforcement or punishment
Wekolamo Reply
please i need answer
Wekolamo
because it helps many people around the world to understand how to interact with other people and understand them well, for example at work (job).
Manix Reply
Agreed 👍 There are many parts of our brains and behaviors, we really need to get to know. Blessings for everyone and happy Sunday!
ARC
A child is a member of community not society elucidate ?
JESSY Reply
Isn't practices worldwide, be it psychology, be it science. isn't much just a false belief of control over something the mind cannot truly comprehend?
Simon Reply
compare and contrast skinner's perspective on personality development on freud
namakula Reply
Skinner skipped the whole unconscious phenomenon and rather emphasized on classical conditioning
war
explain how nature and nurture affect the development and later the productivity of an individual.
Amesalu Reply
nature is an hereditary factor while nurture is an environmental factor which constitute an individual personality. so if an individual's parent has a deviant behavior and was also brought up in an deviant environment, observation of the behavior and the inborn trait we make the individual deviant.
Samuel
I am taking this course because I am hoping that I could somehow learn more about my chosen field of interest and due to the fact that being a PsyD really ignites my passion as an individual the more I hope to learn about developing and literally explore the complexity of my critical thinking skills
Zyryn Reply
good👍
Jonathan
and having a good philosophy of the world is like a sandwich and a peanut butter 👍
Jonathan
generally amnesi how long yrs memory loss
Kelu Reply
interpersonal relationships
Abdulfatai Reply
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