Class Notes (834,972)
York University (35,167)
EECS 3451 (2)
all (2)
Lecture

# lab2.docx

6 Pages
142 Views

School
Department
Electrical Engineering and Computer Science
Course
EECS 3451
Professor
All Professors
Semester
Winter

Description
CSE3451 Section E Lab Assignment 2 Signal Sampling, Manipulation, and Playback By: Aysar Khalid (209728866) Submitted on: September 30 , 2011 Introduction In this lab we were learned how to convert analog signals into digital signals. The objective was to import real signals, such as speech audio using a microphone, and to export it via an output device such as headphones. Using MATLAB we plotted, displayed and analyzed these signals digitally. Then we performed experimental manipulations to various characteristics of the signal such as varying the frequency which in turn changes the pitch. We also performed mathematical modifications to digital audio to produce echoing effects. Lab Preparation Question 1 If we were to call the half function on the samples of the signal (stored in a row vector), then half would output every other element. Meaning there would be fewer samples in the outputted vector than the original sample vector; to be precise there would be 4000 samples per second. And since the sample rate is the same as the playback rate then this affect would be the same on the playback rate which means the playback of the tone would be less clear and would have more noise. Hence, more sampling values in the vector give a higher quality playback. This can be shown using the double function, which would increase the size of the sampling vector to double its original length minus one (15999 samples per second) and it would add neighbouring averages to each element. Therefore, using the double function would give a clearer and less noise-prevalent playback. Higher sampling rates also allow to accurately record higher frequencies of sound. If the original sampled vector is a column vector this would not affect the use of the functions as it has been tested and outputs correct results. Question 2 The fliplr flips a given vector from left to right; for example: If A is a row vector, A = [ 3 5 7 9 ] then fliplr(A) produces [ 97 5 3 1 ] Note that fliplr is limited to only 1 and 2-dimensional vectors only. If fliplr is applied on a sampled row vector then the playback will be played in reverse (good for hearing subliminal messages?). If fliplr is applied on a sampled column vector then the output would not be any different from the original vector. The flipud flips a given vector from up to down; for example: If A is a column vector, A = [ 3 5 7 9 ] then flipud(A) produces [ 97 5 3 1 ] Note that flipud is limited to only 1 and 2-dimensional vectors only. If flipud is applied on a sampled column vector then the playback will be played in reverse (good for hearing subliminal messages?). If flipud is applied on a sampled row vector then the output would not be any different from the original vector. Question 3 Please see MATLAB folder for function, the following is the main algorithm; lx = length(x); n = zeros(1,lx*2+T); n(1:lx) = x; n(lx+T+1:end)= a.*x Lab Experiment Question 1 This question was skipped at the discretion of the Professor and TA. Question 2 A file, ‘P_2_1.wav’, that represented a sampled signal was played in MATLAB by first loading it in by using the wavread command and then sound to play it. It is crucial to note here that although MATLAB attempts to scale the loaded sound file for playback our attempts in autoscaling it using the saxis(‘auto’) command were unaccounted for simply because no such command (or an alternative) existed most likely due to it being out-dated. When the signal is played, the following is heard: Four five chickens and a coke and some dry wheat toast please. It is important to note that when the sound is played its quality is lower, has some static in the background and seems to be played at a lower volume than when played with other programs. Question 3 In the first task, we created a 100-Hz sine wave with 0.6V amplitude and sampled the wave at 8000 Hz. We plotted the signal and played it- it sounded like a medium-low hum. In the next task, we played the signal from the ‘P_2_1.wav’ file. Sampling at 8000 Hz, the sound had amplitude of 0.25V and lasted 3 seconds. In the final task, we recorded our own speech, sampled it and plotted it. Question 4 MATLAB Function Effect Half - Speeds up the signal. - Size of file is halved. - Quality decreased Double - Slows down the signal by almost quadruple original. Original sig
More Less

Related notes for EECS 3451
Me

OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Join to view

OR

By registering, I agree to the Terms and Privacy Policies
Just a few more details

So we can recommend you notes for your school.