>[g, tdoy] = findgroups(floor(doy(t)));
iceavg = splitapply(@nanmean, extent_N, g);

hold <span class="string">on</span>;
plot(tdoy, iceavg, <span class="string">'linewidth'</span>, 2);
</pre><img vspace="5" hspace="5" src="reshapetimeseries_documentation_03.png" alt=""> <p>But that syntax gets awfully clunky when you want to do more in-depth analysis.  Both of these tasks would be a lot simpler if we could just reshape the data into matrix.  The problem, of course, is those pesky leap days, always leading 