Home > classes > @specwin > display.m

display

PURPOSE ^

DISPLAY overloads display functionality for specwin objects.

SYNOPSIS ^

function txt = display(ws, varargin)

DESCRIPTION ^

 DISPLAY overloads display functionality for specwin objects.

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

 DESCRIPTION: DISPLAY overloads display functionality for specwin objects.

 CALL:        txt     = display(specwin)

 INPUT:       specwin - spectral window object

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

 VERSION:     $Id: display.html,v 1.14 2008/03/31 10:27:32 hewitson Exp $

 HISTORY:     30-01-2007 M Hewitson
                 Creation

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function txt = display(ws, varargin)
0002 % DISPLAY overloads display functionality for specwin objects.
0003 %
0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0005 %
0006 % DESCRIPTION: DISPLAY overloads display functionality for specwin objects.
0007 %
0008 % CALL:        txt     = display(specwin)
0009 %
0010 % INPUT:       specwin - spectral window object
0011 %
0012 % OUTPUT:      txt     - cell array with strings to display the spectral window object
0013 %
0014 % VERSION:     $Id: display.html,v 1.14 2008/03/31 10:27:32 hewitson Exp $
0015 %
0016 % HISTORY:     30-01-2007 M Hewitson
0017 %                 Creation
0018 %
0019 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0020 
0021 VERSION  = '$Id: display.html,v 1.14 2008/03/31 10:27:32 hewitson Exp $';
0022 CATEGORY = 'Output';
0023 
0024 % Check if this is a call for parameters
0025 if nargin == 2
0026   if isa(ws, 'specwin') && 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(ws)
0044   w = ws(i);
0045   banner = sprintf('-------- %s ------------', get(w, 'name'));
0046   txt{end+1} = banner;
0047 
0048   txt{end+1} = ' ';
0049   txt{end+1} = sprintf('   alpha: %g', w.alpha);
0050   txt{end+1} = sprintf('    psll: %g', w.psll);
0051   txt{end+1} = sprintf('     rov: %g', w.rov);
0052   txt{end+1} = sprintf('   nenbw: %g', w.nenbw);
0053   txt{end+1} = sprintf('    w3db: %g', w.w3db);
0054   txt{end+1} = sprintf('flatness: %g', w.flatness);
0055   txt{end+1} = sprintf('      ws: %g', w.ws);
0056   txt{end+1} = sprintf('     ws2: %g', w.ws2);
0057   txt{end+1} = sprintf('     win: %d', length(w.win));
0058 
0059   txt{end+1} = ' ';
0060 
0061   banner_end(1:length(banner)) = '-';
0062   txt{end+1} = banner_end;
0063 
0064   txt{end+1} = ' ';
0065   txt{end+1} = ' ';
0066 end
0067 
0068 if nargout == 0
0069   for ii=1:length(txt)
0070     disp(txt{ii});
0071   end
0072 end
0073 
0074 % END

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