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.5 2008/02/12 22:11:21 hewitson Exp $ HISTORY: 31-01-2007 M Hewitson Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
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.5 2008/02/12 22:11:21 hewitson Exp $ 0015 % 0016 % HISTORY: 31-01-2007 M Hewitson 0017 % Creation 0018 % 0019 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0020 0021 VERSION = '$Id: reshapeF.m,v 1.5 2008/02/12 22:11:21 hewitson Exp $'; 0022 CATEGORY = 'Internal'; 0023 0024 if nargin == 2 && isa(fsd, 'fsdata') && ischar(varargin{1}) 0025 if strcmp(varargin{1}, 'Params') 0026 fsd = plist(); 0027 return 0028 elseif strcmp(varargin{1}, 'Version') 0029 fsd = VERSION; 0030 return 0031 elseif strcmp(varargin{1}, 'Category') 0032 fsd = CATEGORY; 0033 return 0034 end 0035 end 0036 0037 if size(fsd.x, 1) ~= size(fsd.y,1) 0038 fsd.x = [fsd.x].'; 0039 end 0040 if size(fsd.x, 1) ~= size(fsd.y,1) 0041 error('### frequency and data vectors are not the same length.'); 0042 end 0043 0044 0045 % END