hw8 - than the bottom one, meaning there is more noise in...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
HW8 Problem 1: % Digital Filtering of an Audio File with a 5th order low pass filter % Read in the file squarewavepluswhitenoise.wav x = wavread( 'squarewavepluswhitenoise.wav' ); % a = 1 for simple filters a = 1; % Creating the code for b for the 5th order filter w = exp(0) + exp(-0.5) + exp(-1) + exp(-1.5) + exp(-2); b = [exp(0) exp(-0.5) exp(-1) exp(-1.5) exp(-2)]/w; % Using MATLAB's built in filter function to filter our wav file y = filter(b, a, x); % Write y, the filtered vector, to squarewavepluswhitenoisefiltered.wav wavwrite(y, 44100, 16, 'squarewavepluswhitenoisefiltered.wav' );
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Problem 2: In the images below, the top image is the unfiltered file and the bottom is the filtered file. As easily noticed, the top wav file has many more sudden sharp transitions
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: than the bottom one, meaning there is more noise in the top wav file. The bottom one appears to be smoother and the square wave is more noticable in the bottom file than the noisy top one. Problem 3: These are the Fourier frequency spectrums of the noisy square wave file and the filtered version. The unfiltered version is on top and the filtered is on the bottom. The main difference in these two is the declining of the baseline in the filtered file. The square wave is made up of low frequency harmonics and as you can see by the diagram, those harmonics were kept intact, meaning the loss was due to the noise loss....
View Full Document

Page1 / 5

hw8 - than the bottom one, meaning there is more noise in...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online