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.m,v 1.6 2008/01/08 16:40:29 ingo 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.m,v 1.6 2008/01/08 16:40:29 ingo Exp $
0015 %
0016 % HISTORY:     30-01-2007 M Hewitson
0017 %                 Creation
0018 %
0019 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0020 
0021 VERSION  = '$Id: display.m,v 1.6 2008/01/08 16:40:29 ingo Exp $';
0022 
0023 % Check if this is a call for parameters
0024 if nargin == 2
0025   if isa(ws, 'specwin') && 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(ws)
0040   w = ws(i);
0041   banner = sprintf('-------- %s ------------', get(w, 'name'));
0042   txt{end+1} = banner;
0043 
0044   txt{end+1} = ' ';
0045   txt{end+1} = sprintf('   alpha: %g', w.alpha);
0046   txt{end+1} = sprintf('    psll: %g', w.psll);
0047   txt{end+1} = sprintf('     rov: %g', w.rov);
0048   txt{end+1} = sprintf('   nenbw: %g', w.nenbw);
0049   txt{end+1} = sprintf('    w3db: %g', w.w3db);
0050   txt{end+1} = sprintf('flatness: %g', w.flatness);
0051   txt{end+1} = sprintf('      ws: %g', w.ws);
0052   txt{end+1} = sprintf('     ws2: %g', w.ws2);
0053   txt{end+1} = sprintf('     win: %d', length(w.win));
0054 
0055   txt{end+1} = ' ';
0056 
0057   banner_end(1:length(banner)) = '-';
0058   txt{end+1} = banner_end;
0059 
0060   txt{end+1} = ' ';
0061   txt{end+1} = ' ';
0062 end
0063 
0064 if nargout == 0
0065   for ii=1:length(txt)
0066     disp(txt{ii});
0067   end
0068 end
0069 
0070 % END

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