12.07.2015 Views

Basics of MATLAB and Beyond

Basics of MATLAB and Beyond

Basics of MATLAB and Beyond

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

the periodograms <strong>of</strong> the blocks, <strong>and</strong> averages the periodograms at eachfrequency. This is a technique commonly used to reduce the variance<strong>of</strong> the PSD. For example, we can compare the variance <strong>of</strong> the aboveestimate to that <strong>of</strong> a single periodogram by telling spectrum to use ablocklength equal to the length <strong>of</strong> the signal:spectrum(y,8192)You can also specify windows to reduce spectral leakage, sampling frequenciesto get correct frequency scales <strong>and</strong> overlapping blocks. If youare interested in PSD estimation, the Signal Processing toolbox containsother methods <strong>of</strong> PSD estimation including Welch’s method, MUSIC,maximum entropy <strong>and</strong> multitaper. matlab also provides a graphicaluser interface for spectral estimation as part <strong>of</strong> its interactive signal processingenvironment sptool. The System Identification toolbox also containsalgorithms for PSD estimation (type iddemo <strong>and</strong> choose option 5for a demonstration).19 Sounds in <strong>MATLAB</strong>matlab can send data to your computer’s speaker, allowing you to visuallymanipulate your data, <strong>and</strong> listen to it at the same time. A digitisedrecording <strong>of</strong> an interesting sound is contained in the mat-file chirp.mat.Load this data, do a plot, <strong>and</strong> listen to the sound by typing:load chirpplot(y)sound(y)The volume <strong>of</strong> the sound can be controlled from within matlab usingthe soundsc function <strong>and</strong> supplying an upper <strong>and</strong> lower limit. Or ifyou wish, you can use your computer’s system s<strong>of</strong>tware to control thevolume. On UNIX the volume <strong>of</strong> the sound can be controlled with thec○ 2000 by CRC Press LLC

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!