doy|> to put this data on a
% day-of-year axis rather than datetimes:

cla;
plot(doy(t), extent_N);

%%
% But ugh, that wrapping from one year to the next prevents any quick and
% easy plotting. And we can calculate statistics across years by using
% |splitapply| or |accumarray|: 

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

hold on;
plot(tdoy, iceavg, 'linewidth', 2);

%%
% But that syntax gets awfully clunky when you want to do more in-depth
% analysis.  Both of the