


GETUPPERFREQ gets the frequency of the highest pole or zero in the model.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: GETUPPERFREQ gets the frequency of the highest pole or zero in
the model.
CALL: f = getupperFreq(pzm);
M-FILE INFO: Get information about this methods by calling
>> pzmodel.getInfo('getupperFreq')
Get information about a specified set-plist by calling:
>> pzmodel.getInfo('getupperFreq', 'None')
VERSION: $Id: getupperFreq.m,v 1.6 2008/07/22 10:24:00 ingo Exp $
HISTORY: 04-04-2007 M Hewitson
Creation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


0001 % GETUPPERFREQ gets the frequency of the highest pole or zero in the model. 0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0003 % 0004 % DESCRIPTION: GETUPPERFREQ gets the frequency of the highest pole or zero in 0005 % the model. 0006 % 0007 % CALL: f = getupperFreq(pzm); 0008 % 0009 % M-FILE INFO: Get information about this methods by calling 0010 % >> pzmodel.getInfo('getupperFreq') 0011 % 0012 % Get information about a specified set-plist by calling: 0013 % >> pzmodel.getInfo('getupperFreq', 'None') 0014 % 0015 % VERSION: $Id: getupperFreq.m,v 1.6 2008/07/22 10:24:00 ingo Exp $ 0016 % 0017 % HISTORY: 04-04-2007 M Hewitson 0018 % Creation 0019 % 0020 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0021 0022 function varargout = getupperFreq(varargin) 0023 0024 %%% Check if this is a call for parameters 0025 if utils.helper.isinfocall(varargin{:}) 0026 varargout{1} = getInfo(varargin{3}); 0027 return 0028 end 0029 0030 pzm = varargin{1}; 0031 poles = pzm.poles; 0032 zeros = pzm.zeros; 0033 np = length(poles); 0034 nz = length(zeros); 0035 f = 0; 0036 for j=1:np 0037 pole = poles(j); 0038 fc = pole.f; 0039 if fc > f 0040 f = fc; 0041 end 0042 end 0043 0044 for j=1:nz 0045 zero = zeros(j); 0046 fc = zero.f; 0047 if fc > f 0048 f = fc; 0049 end 0050 end 0051 0052 % Set outputs 0053 varargout{1} = f; 0054 end 0055 0056 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0057 % Local Functions % 0058 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0059 0060 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0061 % 0062 % FUNCTION: getInfo 0063 % 0064 % DESCRIPTION: Get Info Object 0065 % 0066 % HISTORY: 11-07-07 M Hewitson 0067 % Creation. 0068 % 0069 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0070 0071 function ii = getInfo(varargin) 0072 if nargin == 1 && strcmpi(varargin{1}, 'None') 0073 sets = {}; 0074 pl = []; 0075 else 0076 sets = {'Default'}; 0077 pl = getDefaultPlist; 0078 end 0079 % Build info object 0080 ii = minfo(mfilename, 'pzmodel', '', 'Internal', '$Id: getupperFreq.m,v 1.6 2008/07/22 10:24:00 ingo Exp $', sets, pl); 0081 end 0082 0083 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0084 % 0085 % FUNCTION: getDefaultPlist 0086 % 0087 % DESCRIPTION: Get Default Plist 0088 % 0089 % HISTORY: 11-07-07 M Hewitson 0090 % Creation. 0091 % 0092 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0093 0094 function plo = getDefaultPlist() 0095 plo = plist(); 0096 end 0097