function [rnames,cnames] = getrcname(src)
%GETIONAMES  Returns time series names.

%  Copyright 1986-2002 The MathWorks, Inc.
%  $Revision: 1.1.6.1 $ $Date: 2004/12/26 21:43:31 $

rnames = {};
cnames = {};

%% Do not return channel names from a single timeseries data src since the 
%% assignment of time series columns to axes can be arbitrary
if ~isempty(src.Timeseries2) && ~isempty(src.Timeseries)
    for row=1:size(src.Timeseries2.Data,2)
        rnames{row} = sprintf('%s:%d',src.Timeseries2.Name,row);
    end
    for col=1:size(src.Timeseries.Data,2)
        cnames{col} = sprintf('%s:%d',src.Timeseries.Name,col);
    end
end
% elseif ~isempty(src.Timeseries)
%     rnames = repmat({get(src.Timeseries,'Name')},[size(src.Timeseries.Data,2) 1]);
%     cnames = {''};
% end