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