Home > classes > @mfir > display.m

display

PURPOSE ^

DISPLAY overloads display functionality for mfir objects.

SYNOPSIS ^

function txt = display(fs, varargin)

DESCRIPTION ^

 DISPLAY overloads display functionality for mfir objects.

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

 DESCRIPTION: DISPLAY overloads display functionality for mfir objects.

 CALL:        txt  = display(mfir)

 INPUT:       mfir - FIR filter object

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

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

Generated on Mon 31-Mar-2008 12:20:24 by m2html © 2003