Home > classes > @pzmodel > getlowerFreq.m

getlowerFreq

PURPOSE ^

GETLOWERFREQ gets the frequency of the lowest pole or zero in the model.

SYNOPSIS ^

function varargout = getlowerFreq(varargin)

DESCRIPTION ^

 GETLOWERFREQ gets the frequency of the lowest pole or zero in the model.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: GETLOWERFREQ gets the frequency of the lowest pole or zero in the
              model.

 CALL:        f = getlowerFreq(pzm);

 M-FILE INFO: Get information about this methods by calling
              >> pzmodel.getInfo('getlowerFreq')

              Get information about a specified set-plist by calling:
              >> pzmodel.getInfo('getlowerFreq', 'None')

 VERSION:     $Id: getlowerFreq.m,v 1.7 2008/09/04 15:29:31 ingo Exp $

 HISTORY:     04-04-2007 M Hewitson
                 Creation

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 % GETLOWERFREQ gets the frequency of the lowest pole or zero in the model.
0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0003 %
0004 % DESCRIPTION: GETLOWERFREQ gets the frequency of the lowest pole or zero in the
0005 %              model.
0006 %
0007 % CALL:        f = getlowerFreq(pzm);
0008 %
0009 % M-FILE INFO: Get information about this methods by calling
0010 %              >> pzmodel.getInfo('getlowerFreq')
0011 %
0012 %              Get information about a specified set-plist by calling:
0013 %              >> pzmodel.getInfo('getlowerFreq', 'None')
0014 %
0015 % VERSION:     $Id: getlowerFreq.m,v 1.7 2008/09/04 15:29:31 ingo Exp $
0016 %
0017 % HISTORY:     04-04-2007 M Hewitson
0018 %                 Creation
0019 %
0020 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0021 
0022 function varargout = getlowerFreq(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 = 1e10;
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', '', utils.const.categories.internal, '$Id: getlowerFreq.m,v 1.7 2008/09/04 15:29:31 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

Generated on Mon 08-Sep-2008 13:18:47 by m2html © 2003