RESHAPET reshape the time-vector to match the x vector. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: RESHAPET reshape the time-vector to match the x vector. CALL: tsdata = reshape(tsdata) VERSION: $Id: reshapeT.m,v 1.5 2008/02/13 11:39:35 mauro Exp $ HISTORY: 31-01-2007 M Hewitson Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 function ts = reshapeT(ts, varargin) 0002 % RESHAPET reshape the time-vector to match the x vector. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: RESHAPET reshape the time-vector to match the x vector. 0007 % 0008 % CALL: tsdata = reshape(tsdata) 0009 % 0010 % VERSION: $Id: reshapeT.m,v 1.5 2008/02/13 11:39:35 mauro Exp $ 0011 % 0012 % HISTORY: 31-01-2007 M Hewitson 0013 % Creation 0014 % 0015 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0016 0017 VERSION = '$Id: reshapeT.m,v 1.5 2008/02/13 11:39:35 mauro Exp $'; 0018 CATEGORY = 'Internal'; 0019 0020 if nargin == 2 && isa(ts, 'tsdata') && ischar(varargin{1}) 0021 if strcmp(varargin{1}, 'Params') 0022 ts = plist(); 0023 return 0024 elseif strcmp(varargin{1}, 'Version') 0025 ts = VERSION; 0026 return 0027 elseif strcmp(varargin{1}, 'Category') 0028 ts = CATEGORY; 0029 return 0030 end 0031 end 0032 0033 if size(ts.x, 1) ~= size(ts.y,1) 0034 ts.x = [ts.x].'; 0035 end 0036 0037 % END