Home > classes > @pzmodel > getupperFreq.m

getupperFreq

PURPOSE ^

GETUPPERFREQ gets the frequency of the highest pole or zero in the model.

SYNOPSIS ^

function f = getupperFreq(pzm)

DESCRIPTION ^

 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);

 VERSION:     $Id: getupperFreq.m,v 1.2 2007/07/18 13:58:45 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 = getupperFreq(pzm)
0002 % GETUPPERFREQ gets the frequency of the highest pole or zero in the model.
0003 %
0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0005 %
0006 % DESCRIPTION: GETUPPERFREQ gets the frequency of the highest pole or zero in
0007 %              the model.
0008 %
0009 % CALL:        f = getupperFreq(pzm);
0010 %
0011 % VERSION:     $Id: getupperFreq.m,v 1.2 2007/07/18 13:58:45 ingo Exp $
0012 %
0013 % HISTORY:     04-04-2007 M Hewitson
0014 %                 Creation
0015 %
0016 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0017 
0018 poles = get(pzm, 'poles');
0019 zeros = get(pzm, 'zeros');
0020 np = length(poles);
0021 nz = length(zeros);
0022 f = 0;
0023 for j=1:np
0024   pole = poles(j);
0025   fc = get(pole, 'f');
0026   if fc > f
0027     f = fc;
0028   end
0029 end
0030 
0031 for j=1:nz
0032   zero = zeros(j);
0033   fc = get(zero, 'f');
0034   if fc > f
0035     f = fc;
0036   end
0037 end
0038 
0039 
0040 
0041 % END

Generated on Mon 03-Sep-2007 12:12:34 by m2html © 2003