olution, values are averaged for each date; for dates where the original timeseries included no data, NaNs are used.  The resulting grid <tt>xg</tt> will be a 365 x n grid, where n is the number of unique years spanned by the the original timeseries; <tt>yr</tt> is a vector holding these year values.</p><p><tt>[xg, yr] = reshapetimeseries(t, x, 'bin', nbin)</tt> reshapes the timeseries using <tt>nbin</tt> even time bins per year.  Each bin will hold 365/nbin days worth of data in non-leap years and 366/nbin