Home > classes > @pzmodel > getlowerFreq.m

getlowerFreq

PURPOSE ^

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

SYNOPSIS ^

function f = getlowerFreq(pzm, 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);

 VERSION:     $Id: getlowerFreq.m,v 1.3 2008/01/07 18:13:10 ingo Exp $

 HISTORY:     04-04-2007 M Hewitson
                 Creation

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function f = getlowerFreq(pzm, varargin)
0002 % GETLOWERFREQ gets the frequency of the lowest pole or zero in the model.
0003 %
0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0005 %
0006 % DESCRIPTION: GETLOWERFREQ gets the frequency of the lowest pole or zero in the
0007 %              model.
0008 %
0009 % CALL:        f = getlowerFreq(pzm);
0010 %
0011 % VERSION:     $Id: getlowerFreq.m,v 1.3 2008/01/07 18:13:10 ingo Exp $
0012 %
0013 % HISTORY:     04-04-2007 M Hewitson
0014 %                 Creation
0015 %
0016 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0017 
0018 VERSION  = '$Id: getlowerFreq.m,v 1.3 2008/01/07 18:13:10 ingo Exp $';
0019 
0020 % Check if this is a call for parameters
0021 if nargin == 2
0022   if isa(pzm, 'pzmodel') && ischar(varargin{1})
0023     in = char(varargin{1});
0024     if strcmp(in, 'Params')
0025       f = plist;
0026       return
0027     elseif strcmp(in, 'Version')
0028       f = VERSION;
0029       return
0030     end
0031   end
0032 end
0033 
0034 poles = get(pzm, 'poles');
0035 zeros = get(pzm, 'zeros');
0036 np = length(poles);
0037 nz = length(zeros);
0038 f = 1e10;
0039 for j=1:np
0040   pole = poles(j);
0041   fc = get(pole, 'f');
0042   if fc < f
0043     f = fc;
0044   end
0045 end
0046 
0047 for j=1:nz
0048   zero = zeros(j);
0049   fc = get(zero, 'f');
0050   if fc < f
0051     f = fc;
0052   end
0053 end
0054 
0055 
0056 
0057 % END

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