comparison m-toolbox/classes/@ao/double.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 % DOUBLE overloads double() function for analysis objects.
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %
4 % DESCRIPTION: DOUBLE overloads double() function for analysis objects.
5 %
6 % CALL: y = double(ao_in);
7 %
8 % <a href="matlab:utils.helper.displayMethodInfo('ao', 'double')">Parameters Description</a>
9 %
10 % VERSION: $Id: char.m,v 1.28 2010/12/17 15:33:58 hewitson Exp $
11 %
12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13
14 function varargout = double(varargin)
15
16 % Check if this is a call for parameters
17 if utils.helper.isinfocall(varargin{:})
18 varargout{1} = getInfo(varargin{3});
19 return
20 end
21
22 import utils.const.*
23 utils.helper.msg(msg.PROC3, 'running %s/%s', mfilename('class'), mfilename);
24
25 % Collect input variable names
26 in_names = cell(size(varargin));
27 for ii = 1:nargin,in_names{ii} = inputname(ii);end
28
29 % Collect all AOs and plists
30 as = utils.helper.collect_objects(varargin(:), 'ao', in_names);
31
32 out = [];
33 for kk=1:numel(as)
34 out = [out as.y];
35 end
36
37 varargout{1} = out;
38
39 end
40
41 %--------------------------------------------------------------------------
42 % Get Info Object
43 %--------------------------------------------------------------------------
44 function ii = getInfo(varargin)
45 if nargin == 1 && strcmpi(varargin{1}, 'None')
46 sets = {};
47 pl = [];
48 else
49 sets = {'Default'};
50 pl = getDefaultPlist;
51 end
52 % Build info object
53 ii = minfo(mfilename, 'ao', 'ltpda', utils.const.categories.converter, '$Id: char.m,v 1.28 2010/12/17 15:33:58 hewitson Exp $', sets, pl);
54 ii.setModifier(false);
55 ii.setOutmin(0);
56 end
57
58 %--------------------------------------------------------------------------
59 % Get Default Plist
60 %--------------------------------------------------------------------------
61
62 function plout = getDefaultPlist()
63 persistent pl;
64 if exist('pl', 'var')==0 || isempty(pl)
65 pl = buildplist();
66 end
67 plout = pl;
68 end
69
70 function pl_default = buildplist()
71 pl_default = plist.EMPTY_PLIST;
72 end
73