GETUPPERFREQ gets the frequency of the highest pole or zero in the model. usage: f = getupperFreq(pzm); M Hewitson 04-04-07 $Id: getupperFreq.html,v 1.1 2007/06/08 14:15:07 hewitson Exp $
0001 function f = getupperFreq(pzm) 0002 0003 % GETUPPERFREQ gets the frequency of the highest pole or zero in the model. 0004 % 0005 % usage: f = getupperFreq(pzm); 0006 % 0007 % M Hewitson 04-04-07 0008 % 0009 % $Id: getupperFreq.html,v 1.1 2007/06/08 14:15:07 hewitson Exp $ 0010 % 0011 0012 poles = get(pzm, 'poles'); 0013 zeros = get(pzm, 'zeros'); 0014 np = length(poles); 0015 nz = length(zeros); 0016 f = 0; 0017 for j=1:np 0018 pole = poles(j); 0019 fc = get(pole, 'f'); 0020 if fc > f 0021 f = fc; 0022 end 0023 end 0024 0025 for j=1:nz 0026 zero = zeros(j); 0027 fc = get(zero, 'f'); 0028 if fc > f 0029 f = fc; 0030 end 0031 end 0032 0033 0034 0035 % END