Hello:
I have an 40×2 matrix, in which the first column shows day index and the 2nd column value for each day:
1 112 123 104 105 126 117 128 109 1210 1011 1212 1213 1014 915 1216 1217 1218 1119 1020 1021 1122 1123 1024 825 926 927 928 829 830 1231 1132 933 934 1235 1136 1137 1038 1039 1140 9
How to compute centered moving average with 30 days moving window taking 15th of the day as the midpoint and traversing backward 14 days and forward 15 days? Basically I want to compute: Xavg = median[X(i-14):X(i+15)]. where X(i) is the data point and Average is the averaging operator. I found a few thread using convolution operator but could not find out how to fix step size since my mid point is located on the 15th day and further how to compute median effect?
Best Answer