function h=loadobj(s)
% LOADOBJ Overload load command

%   Author(s): James G. Owen, Rong Chen
%   Copyright 1986-2004 The MathWorks, Inc.
%   $Revision: 1.1.6.1 $  $Date: 2004/12/26 21:35:53 $

h = tsdata.tscollection;
props = fieldnames(s);
for k=1:length(props)
    if isa(s.(props{k}),'tsdata.timeseriesArray')
        h.(props{k})=s.(props{k}).copy;
    elseif isa(s.(props{k}),'tsdata.timemetadata')
        h.(props{k})=s.(props{k}).copy;
    elseif isa(s.(props{k}),'tsdata.timeseries')
        h.addts(s.(props{k}));
    else
        h.(props{k})=s.(props{k});
    end
end
