Home > classes > @pole > display.m

display

PURPOSE ^

DISPLAY display a pole

SYNOPSIS ^

function display(p)

DESCRIPTION ^

 DISPLAY display a pole

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

 DESCRIPTION: DISPLAY display a pole

 VERSION:     $Id: display.m,v 1.2 2007/07/18 13:58:45 ingo Exp $

 HISTORY:     30-01-2007 M Hewitson
                  Creation

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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

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