Home > classes > @pole > display.m

display

PURPOSE ^

DISPLAY display a pole

SYNOPSIS ^

function display(p)

DESCRIPTION ^

 DISPLAY display a pole
 
 M Hewitson 30-01-07
 
 $Id: display.html,v 1.1 2007/06/08 14:15:07 hewitson Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function display(p)
0002 
0003 % DISPLAY display a pole
0004 %
0005 % M Hewitson 30-01-07
0006 %
0007 % $Id: display.html,v 1.1 2007/06/08 14:15:07 hewitson Exp $
0008 %
0009 
0010 for i=1:length(p)
0011   banner = sprintf('---- pole %d ----', i);
0012   disp(banner);
0013   
0014   % get key and value
0015   name = get(p(i), 'name');
0016   f    = get(p(i), 'f');
0017   q    = get(p(i), 'q');
0018   ri   = get(p(i), 'ri');
0019   
0020   % display
0021   if ~isempty(f) 
0022     if q > 0.5
0023       disp([ sprintf('%s: %g Hz, Q=%g [', name, f, q) num2str(ri(1)) ']']);
0024     else
0025       disp(sprintf('%s: %g Hz', name, f))      
0026     end
0027   end
0028 
0029   bannerEnd = [];
0030   while length(bannerEnd) < length(banner)
0031     bannerEnd = [bannerEnd '-'];
0032   end
0033   disp(bannerEnd);
0034   
0035 end
0036 
0037 
0038

Generated on Fri 08-Jun-2007 16:09:11 by m2html © 2003