Home > classes > @miir > display.m

display

PURPOSE ^

DISPLAY overloads display functionality for miir objects.

SYNOPSIS ^

function txt = display(fs, varargin)

DESCRIPTION ^

 DISPLAY overloads display functionality for miir objects.

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

 DESCRIPTION: DISPLAY overloads display functionality for miir objects.

 CALL:        txt  = display(miir)

 INPUT:       miir - IIR filter object

 OUTPUT:      txt  - cell array with strings to display the miir object

 VERSION:     $Id: display.m,v 1.10 2008/01/08 16:39:11 ingo Exp $

 HISTORY:     11-01-2007 M Hewitson
                 Creation

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function txt = display(fs, varargin)
0002 % DISPLAY overloads display functionality for miir objects.
0003 %
0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0005 %
0006 % DESCRIPTION: DISPLAY overloads display functionality for miir objects.
0007 %
0008 % CALL:        txt  = display(miir)
0009 %
0010 % INPUT:       miir - IIR filter object
0011 %
0012 % OUTPUT:      txt  - cell array with strings to display the miir object
0013 %
0014 % VERSION:     $Id: display.m,v 1.10 2008/01/08 16:39:11 ingo Exp $
0015 %
0016 % HISTORY:     11-01-2007 M Hewitson
0017 %                 Creation
0018 %
0019 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0020 
0021 VERSION = '$Id: display.m,v 1.10 2008/01/08 16:39:11 ingo Exp $';
0022 
0023 % Check if this is a call for parameters
0024 if nargin == 2
0025   if isa(fs, 'miir') && ischar(varargin{1})
0026     in = char(varargin{1});
0027     if strcmp(in, 'Params')
0028       txt = plist();
0029       return
0030     elseif strcmp(in, 'Version')
0031       txt = VERSION;
0032       return
0033     end
0034   end
0035 end
0036 
0037 txt = {};
0038 
0039 for i=1:numel(fs)
0040   f = fs(i);
0041   banner_start = sprintf('-------- %s / %s ------------', get(f, 'name'), get(f, 'version'));
0042   txt{end+1} = banner_start;
0043 
0044   txt{end+1} = ' ';
0045   txt{end+1} = sprintf('created: %s', char(f.created));
0046   txt{end+1} = sprintf('version: %s', f.version);
0047   txt{end+1} = sprintf('   name: %s', f.name);
0048   txt{end+1} = ['     fs: ' num2str(f.fs)];
0049   txt{end+1} = ['  ntaps: ' num2str(f.ntaps)];
0050   txt{end+1} = ['      a: ' num2str(f.a)];
0051   txt{end+1} = ['      b: ' num2str(f.b)];
0052   txt{end+1} = ['   gain: ' num2str(f.gain)];
0053   txt{end+1} = [' histin: ' num2str(f.histin)];
0054   txt{end+1} = ['histout: ' num2str(f.histout)];
0055 
0056   txt{end+1} = sprintf('Parameters:');
0057   txt_plist = display(f.plist);
0058 
0059   for ii = 1:length(txt_plist)
0060     txt{end+1} = txt_plist{ii};
0061   end
0062 
0063   txt{end+1} = ' ';
0064 
0065   banner_end(1:length(banner_start)) = '-';
0066   txt{end+1} = banner_end;
0067 
0068   txt{end+1} = ' ';
0069   txt{end+1} = ' ';
0070 end
0071 
0072 if nargout == 0
0073   for ii=1:length(txt)
0074     disp(txt{ii});
0075   end
0076 end
0077 
0078 
0079 % END

Generated on Tue 22-Jan-2008 10:39:13 by m2html © 2003