Home > classes > @pzmodel > display.m

display

PURPOSE ^

DISPLAY display a pzmodel.

SYNOPSIS ^

function display(p)

DESCRIPTION ^

 DISPLAY display a pzmodel.

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

 DESCRIPTION: DISPLAY display a pzmodel.

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

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