Home > classes > @pzmodel > display.m

display

PURPOSE ^

DISPLAY display a pzmodel

SYNOPSIS ^

function display(p)

DESCRIPTION ^

 DISPLAY display a pzmodel
 
 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 pzmodel
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('---- pzmodel %d ----', i);
0012   disp(banner);
0013   
0014   % get key and value
0015   name = get(p(i), 'name');
0016   g    = get(p(i), 'gain');
0017   ps   = get(p(i), 'poles');
0018   zs   = get(p(i), 'zeros');
0019   np   = length(ps);
0020   nz   = length(zs);
0021   
0022   % display
0023   disp(['model: ' name]);
0024   disp(['gain: ' num2str(g)]);
0025   for j=1:np
0026     disp([sprintf('pole %03d: ', j) char(ps(j)) ]);
0027   end
0028   for j=1:nz
0029     disp([sprintf('zero %03d: ', j) char(zs(j)) ]);
0030   end
0031   
0032   bannerEnd = [];
0033   while length(bannerEnd) < length(banner)
0034     bannerEnd = [bannerEnd '-'];
0035   end
0036   disp(bannerEnd);
0037   
0038 end
0039 
0040 
0041

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