Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is for a computations class. It has to be done in matlab. Thank you 5. Write a function called smooth_data.m that will smooth noisy

This is for a computations class. It has to be done in matlab. Thank you image text in transcribed
5. Write a function called smooth_data.m that will smooth noisy data using a two-point average ri + 1 for all points A backwards average will be used for the smoothing such that arg except for k = 1 where rarg; =1. Use a for loop to implement this smoothing routine. Then write a script called test smooth_data.m which tests the smooth_data.m function on the data sets below. Be sure to plot the original data and the smoothed data on the same plot such as shown below. (a) Noisy data from a normal distribution with a mean of 10.0 and a standard deviation of 2.0 noisy data10.02.0 randn (100,1) b) Noisy data from sin wave with amplitude of 1 with random noise sampled from a normal distribution with a mean of 1 and a standard deviation of 0.25 tlinspace (O,10, 100) noise10.25 randn (100,1) noisy datasin(t) noise; 2.5 nolsy data 1.5 0.5

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions