Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please provide the finished code, will thumb's up! Download the starter code W23HW8.m from CANVAS Files section folder HW Problems and Solutions to your computer,
Please provide the finished code, will thumb's up!
Download the starter code W23HW8.m from CANVAS Files section folder "HW Problems and Solutions" to your computer, and rename it as YourlastnameYourfirstnameHW8.m. The starter 1 code plots a true signal x(t) (in solid black) that is NOT known. Only the noise corrupted signal xnoisy(t) (in solid blue), as shown in the plot above, is available as a sensor measurement. As data scientist, your job is to recover an estimate x(t) of the true signal from the noisy measured signal xnoisy(t). We think of t as time; the noisy signal was measured at 500 different time instances. This problem can be formulated as x=xR500argmin{xxnoisy22+k=1499(xk+1xk)2},>0, where xk denotes the kth entry of the vector x. We can interpret the above optimization problem as follows. Since we want the recovered signal to be close to the measured signal xnoisy, it makes sense to minimize xxnoisy22. This justifies the first summand in the objective. We also want the estimated signal to be "smooth" in the sense it should not change too rapidly between consecutive times. To mathematically capture this, the second summand penalizes rapid changes in the signal between consecutive times. The known parameter >0 is fixed. Therefore, the first summand in the objective represents data fidelity; the second summand in the objective promotes regularization/smoothness. Large implies smoother but larger mismatch with the measured signal. Similarly, small implies better match with the measured but more "spiky" signal. For numerical solution, you need to rewrite problem (1) in the standard least squares form x=xR500argminAxb22 for some appropriately defined tall matrix A and vector b. Your job is to complete the starter code by typing in some lines between lines 25 and 30 . Then uncomment lines 32-43 and complete line 37 within the for loop. The completed code should make a plot of the estimated signals for =1,10,100 together with the blue and black curves shown above, all in the same figure. In the zip file containing your MATLAB code, please also include a file named YourlastnameY ourfirstnameHw8.pdf that clearly shows your hand calculations in deriving the tall matrix A and vector b appearing in the standard least squares form. Hint: You may find the MATLAB commands eye and zeros useful. Please look them up in MATLAB documentation in case you are not familiar with themStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started