Home > classes > @specwin > char.m

char

PURPOSE ^

CHAR convert a specwin object into a string.

SYNOPSIS ^

function varargout = char(varargin)

DESCRIPTION ^

 CHAR convert a specwin object into a string.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: CHAR convert a specwin object into a string.

 CALL:        string = char(sw);

 M-FILE INFO: Get information about this methods by calling
              >> specwin.getInfo('char')

              Get information about a specified set-plist by calling:
              >> specwin.getInfo('char', 'set')

 VERSION:     $Id: char.m,v 1.7 2008/09/04 15:29:31 ingo Exp $

 HISTORY:     04-02-2007 M Hewitson
                 Creation

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 % CHAR convert a specwin object into a string.
0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0003 %
0004 % DESCRIPTION: CHAR convert a specwin object into a string.
0005 %
0006 % CALL:        string = char(sw);
0007 %
0008 % M-FILE INFO: Get information about this methods by calling
0009 %              >> specwin.getInfo('char')
0010 %
0011 %              Get information about a specified set-plist by calling:
0012 %              >> specwin.getInfo('char', 'set')
0013 %
0014 % VERSION:     $Id: char.m,v 1.7 2008/09/04 15:29:31 ingo Exp $
0015 %
0016 % HISTORY:     04-02-2007 M Hewitson
0017 %                 Creation
0018 %
0019 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0020 
0021 function varargout = char(varargin)
0022 
0023   %%% Check if this is a call for parameters
0024   if utils.helper.isinfocall(varargin{:})
0025     varargout{1} = getInfo(varargin{3});
0026     return
0027   end
0028 
0029   %%% Get input
0030   objs = utils.helper.collect_objects(varargin(:), 'specwin');
0031 
0032   pstr = [];
0033   for kk = 1:numel(objs)
0034     w = objs(kk);
0035 
0036     pstr = ['(' pstr w.type];
0037     pstr = [pstr ', alpha=' num2str(w.alpha)];
0038     pstr = [pstr ', psll=' num2str(w.psll)];
0039     pstr = [pstr ', rov=' num2str(w.rov)];
0040     pstr = [pstr ', nenbw=' num2str(w.nenbw)];
0041     pstr = [pstr ', w3db=' num2str(w.w3db)];
0042     pstr = [pstr ', flatness=' num2str(w.flatness) '), '];
0043 
0044     pstr = strrep(pstr, '_', '\_');
0045   end
0046 
0047   varargout{1} = pstr(1:end-2);
0048 
0049 end
0050 
0051 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0052 %                               Local Functions                               %
0053 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0054 
0055 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0056 %
0057 % FUNCTION:    getInfo
0058 %
0059 % DESCRIPTION: Get Info Object
0060 %
0061 % HISTORY:     11-07-07 M Hewitson
0062 %                Creation.
0063 %
0064 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0065 
0066 function ii = getInfo(varargin)
0067   if nargin == 1 && strcmpi(varargin{1}, 'None')
0068     sets = {};
0069     pl   = [];
0070   else
0071     sets = {'Default'};
0072     pl   = getDefaultPlist;
0073   end
0074   % Build info object
0075   ii = minfo(mfilename, 'specwin', '', utils.const.categories.output, '$Id: char.m,v 1.7 2008/09/04 15:29:31 ingo Exp $', sets, pl);
0076 end
0077 
0078 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0079 %
0080 % FUNCTION:    getDefaultPlist
0081 %
0082 % DESCRIPTION: Get Default Plist
0083 %
0084 % HISTORY:     11-07-07 M Hewitson
0085 %                Creation.
0086 %
0087 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0088 
0089 function plo = getDefaultPlist()
0090   plo = plist();
0091 end
0092

Generated on Mon 08-Sep-2008 13:18:47 by m2html © 2003