comparison m-toolbox/classes/@miir/display.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 % DISPLAY overloads display functionality for miir objects.
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %
4 % DESCRIPTION: DISPLAY overloads display functionality for miir objects.
5 %
6 % CALL: txt = display(miir)
7 %
8 % INPUT: miir - IIR filter object
9 %
10 % OUTPUT: txt - cell array with strings to display the miir object
11 %
12 % <a href="matlab:utils.helper.displayMethodInfo('miir', 'display')">Parameters Description</a>
13 %
14 % VERSION: $Id: display.m,v 1.24 2011/04/08 08:56:34 hewitson Exp $
15 %
16 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17
18 function varargout = display(varargin)
19
20 %%% Check if this is a call for parameters
21 if utils.helper.isinfocall(varargin{:})
22 varargout{1} = getInfo(varargin{3});
23 return
24 end
25
26 %%% Get miir objects
27 objs = utils.helper.collect_objects(varargin(:), 'miir');
28
29 %%% get display text
30 txt = utils.helper.objdisp(objs);
31
32 if nargout == 0
33 for ii=1:length(txt)
34 disp(txt{ii});
35 end
36 else
37 varargout{1} = txt;
38 end
39 end
40
41 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
42 % Local Functions %
43 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
44
45 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
46 %
47 % FUNCTION: getInfo
48 %
49 % DESCRIPTION: Get Info Object
50 %
51 % HISTORY: 11-07-07 M Hewitson
52 % Creation.
53 %
54 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
55
56 function ii = getInfo(varargin)
57 if nargin == 1 && strcmpi(varargin{1}, 'None')
58 sets = {};
59 pl = [];
60 else
61 sets = {'Default'};
62 pl = getDefaultPlist;
63 end
64 % Build info object
65 ii = minfo(mfilename, 'miir', 'ltpda', utils.const.categories.output, '$Id: display.m,v 1.24 2011/04/08 08:56:34 hewitson Exp $', sets, pl);
66 ii.setModifier(false);
67 ii.setOutmin(0);
68 end
69
70 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
71 %
72 % FUNCTION: getDefaultPlist
73 %
74 % DESCRIPTION: Get Default Plist
75 %
76 % HISTORY: 11-07-07 M Hewitson
77 % Creation.
78 %
79 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
80
81 function plout = getDefaultPlist()
82 persistent pl;
83 if exist('pl', 'var')==0 || isempty(pl)
84 pl = buildplist();
85 end
86 plout = pl;
87 end
88
89 function pl = buildplist()
90 pl = plist.EMPTY_PLIST;
91 end
92