Home > classes > @specwin > string.m

string

PURPOSE ^

STRING writes a command string that can be used to recreate the input window object.

SYNOPSIS ^

function cmd = string(sw ,varargin)

DESCRIPTION ^

 STRING writes a command string that can be used to recreate the input window object.

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

 DESCRIPTION: STRING writes a command string that can be used to recreate the
              input window object.

 CALL:        cmd = string(sw)

 VERSION:     $Id: string.m,v 1.3 2008/01/11 14:04:43 ingo Exp $

 HISTORY:     29-03-2007 M Hewitson
                 Creation

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function cmd = string(sw ,varargin)
0002 % STRING writes a command string that can be used to recreate the input window object.
0003 %
0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0005 %
0006 % DESCRIPTION: STRING writes a command string that can be used to recreate the
0007 %              input window object.
0008 %
0009 % CALL:        cmd = string(sw)
0010 %
0011 % VERSION:     $Id: string.m,v 1.3 2008/01/11 14:04:43 ingo Exp $
0012 %
0013 % HISTORY:     29-03-2007 M Hewitson
0014 %                 Creation
0015 %
0016 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0017 
0018 VERSION  = '$Id: string.m,v 1.3 2008/01/11 14:04:43 ingo Exp $';
0019 
0020 % Check if this is a call for parameters
0021 if nargin == 2
0022   if isa(sw, 'specwin') && ischar(varargin{1})
0023     in = char(varargin{1});
0024     if strcmp(in, 'Params')
0025       cmd = plist();
0026       return
0027     elseif strcmp(in, 'Version')
0028       cmd = VERSION;
0029       return
0030     end
0031   end
0032 end
0033 
0034 switch sw.name
0035   case 'Kaiser'
0036     cmd = ['specwin(''' sw.name ''', ' num2str(length(sw.win)) ', ' num2str(sw.psll) ')'];
0037   case 'Flattop' % Flattop windows are not supported
0038     cmd = ['specwin(''' sw.name ''', ' num2str(length(sw.win)) ', ' num2str(sw.psll) ')'];
0039   otherwise
0040     cmd = ['specwin(''' sw.name ''', ' num2str(length(sw.win)) ')'];
0041 end
0042 
0043 % END

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