Question: Please use an example dataset to serve as newCases. this is in Matlab Programming When computing the moving average for a particular time, it makes
Please use an example dataset to serve as newCases. this is in Matlab Programming
When computing the moving average for a particular time, it makes sense to give closer (in time) points more weight in the average. The total sum of weights should be 1. The simplest example of such an averaging is exponential smoothing, where weights are decaying exponentially: y[n] = (1 - ax[n] + ay n - 1 for n> 1; y[1] = x[1] Plot exponentially smoothed newCases for a= 0.05,0.5, 0.99. Note: Please do not use builtin Financial Toolbox functions such as smoothts, or tsmovavg. % wrire your code here % wrire your code here When computing the moving average for a particular time, it makes sense to give closer (in time) points more weight in the average. The total sum of weights should be 1. The simplest example of such an averaging is exponential smoothing, where weights are decaying exponentially: y[n] = (1 - ax[n] + ay n - 1 for n> 1; y[1] = x[1] Plot exponentially smoothed newCases for a= 0.05,0.5, 0.99. Note: Please do not use builtin Financial Toolbox functions such as smoothts, or tsmovavg. % wrire your code here % wrire your code here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
