Calculate weekly (or monthly) average of time series data in MATLAB
<p>Suppose that we have <code>DT_vec</code> in MATLAB R2015b:</p>

<pre><code>DT_vec = 
2008    7   21  0   0   0
2008    7   22  0   0   0
2008    7   23  0   0   0
2008    7   29  0   0   0
2008    8   4   0   0   0
2008    8   12  0   0   0
2008    9   14  0   0   0
2008    9   15  0   0   0
2008    9   16  0   0   0
2008    9   17  0   0   0
2008    9   20  0   0   0
2008    9   21  0   0   0
</code></pre>

<p>Data stored in <code>My_data</code>:</p>

<pre><code>32
43
12
43
2
12
54
32
34
5
32
12
</code></pre>

<p>I want calculate weekly (or monthly) average of this time series (<code>My_data</code>). How can I do that?</p>