Home > classes > @miir > char.m

char

PURPOSE ^

CHAR convert a miir object into a string.

SYNOPSIS ^

function varargout = char(varargin)

DESCRIPTION ^

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

 DESCRIPTION: CHAR convert a miir object into a string.

 CALL:        string = char(miir)

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

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

 VERSION:     $Id: char.m,v 1.10 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 miir object into a string.
0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0003 %
0004 % DESCRIPTION: CHAR convert a miir object into a string.
0005 %
0006 % CALL:        string = char(miir)
0007 %
0008 % M-FILE INFO: Get information about this methods by calling
0009 %              >> miir.getInfo('char')
0010 %
0011 %              Get information about a specified set-plist by calling:
0012 %              >> miir.getInfo('char', 'set')
0013 %
0014 % VERSION:     $Id: char.m,v 1.10 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   objs = utils.helper.collect_objects(varargin(:), 'miir');
0030 
0031   pstr = '';
0032 
0033   for ii = 1:numel(objs)
0034     obj = objs(ii);
0035 
0036     pstr = [pstr sprintf('%s(fs=%.2f, ntaps=%.2f', obj.name, obj.fs, obj.ntaps)];
0037     pstr = [pstr ', a=' mat2str(obj.a,3)];
0038     pstr = [pstr ', b=' mat2str(obj.b,3) '), '];
0039   end
0040 
0041   pstr = strrep(pstr, '_', '\_');
0042   pstr = pstr(1:end-2);
0043 
0044   varargout{1} = pstr;
0045 end
0046 
0047 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0048 %                               Local Functions                               %
0049 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0050 
0051 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0052 %
0053 % FUNCTION:    getInfo
0054 %
0055 % DESCRIPTION: Get Info Object
0056 %
0057 % HISTORY:     11-07-07 M Hewitson
0058 %                Creation.
0059 %
0060 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0061 
0062 function ii = getInfo(varargin)
0063   if nargin == 1 && strcmpi(varargin{1}, 'None')
0064     sets = {};
0065     pl   = [];
0066   else
0067     sets = {'Default'};
0068     pl   = getDefaultPlist;
0069   end
0070   % Build info object
0071   ii = minfo(mfilename, 'miir', '', utils.const.categories.output, '$Id: char.m,v 1.10 2008/09/04 15:29:31 ingo Exp $', sets, pl);
0072 end
0073 
0074 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0075 %
0076 % FUNCTION:    getDefaultPlist
0077 %
0078 % DESCRIPTION: Get Default Plist
0079 %
0080 % HISTORY:     11-07-07 M Hewitson
0081 %                Creation.
0082 %
0083 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0084 
0085 function plo = getDefaultPlist()
0086   plo = plist();
0087 end
0088

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