function this = timeseries(varargin)
%TIMESERIES  Create a time-series object
%   TS = TSDATA.TIMESERIES creates an empty time series object.
% 
%   TS = TSDATA.TIMESERIES(X) creates a time series object where the
%   numerical array X defines the ordinate (dependent) data of the time 
%   series. A default time vector is used where the time starts at 0 and 
%   increases in increments of 1 sec and the length of the time vector is 
%   equal to the size of the first dimension of X. When X is a string, an
%   empty timeseries object with the name given by the string is created. 
%
%   TS = TSDATA.TIMESERIES(X,T) creates a time series object where the
%   numerical array X defines the ordinate, dependent data of the time 
%   series and the row or column vector T defines the time data. When T is
%   a string, a timeseries object named by the string is created, and a
%   default time vector is automatically generated. 
%
%   TS = TSDATA.TIMESERIES(X,T,N) creates a time series object where the
%   numerical array X defines the ordinate, dependent data of the time 
%   series, the row or column vector T defines the time data, and the 
%   string N defines the name of the object. Note that the name string must
%   be a valid property name (i.e., no spaces or punctuation marks) or an 
%   error will occur. When no name is supplied the constructor supplies a
%   default name. 
%
%   For information on the time series object properties, type HELP TSPROPS
%
%   EXAMPLES:
%   Create a time series object called 'LaunchData' that contains 4 data 
%   sets, each of length 5 and uses a default time vector:
%   b=tsdata.timeseries(rand(5,4),'LaunchData')
%
%   Create a time series object containing a single data set of length 5
%   and a time vector starting at 1 and ending at 5:
%   b=tsdata.timeseries(rand(5,1),[1 2 3 4 5])
%
%   Create a time series object called 'FinancialData' containing 5 data 
%   points at a single time point:
%   b=tsdata.timeseries(rand(5,1),1,'FinancialData')
%
%   See also TSDATA.TIMESERIES/ADDSAMPLE, TSDATA.TIMESERIES

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

%% Get the time series feature. For integration purposes protect against
%% the feature being unregistered.
try
    thisfeatureon = feature('TimeSeriesTools');
catch
    thisfeatureon = true;
end
if ~thisfeatureon
    error('This feature has not been enabled')
end

this = tsdata.timeseries; 
if ~isempty(varargin)
   init(this,varargin{:});
end