The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 399 Weeks Ago, 1 Day Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Write a function with the declaration: smoothed=rectFilt(x,width). The filter should take a vector of noisy data (x) and smooth it b y doing a symmetric moving average with a window of the specified width. For example if width=5, then smoothed(n) should equal mean(x(n -A????1? 2:n+2)). Note that you may have problems around the edges: when n<3 and n>length(x) -A????1? 2. 3.1. The lengths of x and smoothed sho uld be equal. 3.2. For symmetry to work, make sure that width is odd. If it isnA????1t, increase it by 1 to make it odd and display a warning, but still do the smoothing. 3.3. Make sure you correct edge effects so that the smoothed function doesnA????1t deviate from the origi nal at the start or the end. Also make sure you donA????1t have any horizontal offset between the smoothed function and the original (since weA????1re using a symmetric moving average, the smoothed values should lie on top of the original data). 3.4. You can do this usin g a loop and mean (which should be easy but may be slow), or more efficiently by using conv (if you are familiar with convolution). 3.5. Load the mat file called noisyData.mat. It contains a variable x which is a noisy line. Plot the noisy data as well as your smoothed version .
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll