function s = getsize(h, varargin)

if ~isempty(h.Timeseries) && ~isempty(h.Timeseries2)
    s = [h.Timeseries.getContainer('Data').SampleSize(1) ...
             h.Timeseries2.getContainer('Data').SampleSize(1) 1];
elseif ~isempty(h.Timeseries)
    s = [h.Timeseries.getContainer('Data').SampleSize(1) 1 1];
else
    s = [0 0];
end

if nargin>1
   s = s(varargin{1});
end