Home > classes > @xydata > reshapeX.m

reshapeX

PURPOSE ^

RESHAPEX reshape the X to match the Y vector.

SYNOPSIS ^

function xy = reshapeX(xy, varargin)

DESCRIPTION ^

 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.html,v 1.14 2008/03/31 10:27:43 hewitson Exp $

 HISTORY:     31-01-07 M Hewitson
                 Creation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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.html,v 1.14 2008/03/31 10:27:43 hewitson Exp $
0011 %
0012 % HISTORY:     31-01-07 M Hewitson
0013 %                 Creation
0014 %
0015 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0016 
0017 VERSION  = '$Id: reshapeX.html,v 1.14 2008/03/31 10:27:43 hewitson 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

Generated on Mon 31-Mar-2008 12:20:24 by m2html © 2003