Home > classes > @fsdata > reshapeF.m

reshapeF

PURPOSE ^

RESHAPEF reshape the frequency vector to match the y vector.

SYNOPSIS ^

function fsd = reshapeF(fsd, varargin)

DESCRIPTION ^

 RESHAPEF reshape the frequency vector to match the y vector.

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

 DESCRIPTION: RESHAPEF reshape the frequency vector to match the y vector.

 CALL:        fsd = reshapeF(fsd)

 INPUT:       fsd - frequency-series object

 OUTPUT       fsd - the reshaped frequency-series object

 VERSION:     $Id: reshapeF.m,v 1.4 2007/11/30 19:36:05 ingo Exp $

 HISTORY:     31-01-2007 M Hewitson
                 Creation

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function fsd = reshapeF(fsd, varargin)
0002 % RESHAPEF reshape the frequency vector to match the y vector.
0003 %
0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0005 %
0006 % DESCRIPTION: RESHAPEF reshape the frequency vector to match the y vector.
0007 %
0008 % CALL:        fsd = reshapeF(fsd)
0009 %
0010 % INPUT:       fsd - frequency-series object
0011 %
0012 % OUTPUT       fsd - the reshaped frequency-series object
0013 %
0014 % VERSION:     $Id: reshapeF.m,v 1.4 2007/11/30 19:36:05 ingo Exp $
0015 %
0016 % HISTORY:     31-01-2007 M Hewitson
0017 %                 Creation
0018 %
0019 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0020 
0021 VERSION  = '$Id: reshapeF.m,v 1.4 2007/11/30 19:36:05 ingo Exp $';
0022 
0023 if  nargin == 2 && isa(fsd, 'fsdata') && ischar(varargin{1})
0024   if strcmp(varargin{1}, 'Params')
0025     fsd = plist();
0026     return
0027   elseif strcmp(varargin{1}, 'Version')
0028     fsd = VERSION;
0029     return
0030   end
0031 end
0032 
0033 if size(fsd.x, 1) ~= size(fsd.y,1)
0034   fsd.x = [fsd.x].';
0035 end
0036 if size(fsd.x, 1) ~= size(fsd.y,1)
0037   error('### frequency and data vectors are not the same length.');
0038 end
0039 
0040 
0041 % END

Generated on Tue 22-Jan-2008 10:39:13 by m2html © 2003