Mercurial > hg > ltpda
diff m-toolbox/classes/@ao/dy.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m-toolbox/classes/@ao/dy.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,74 @@ +% DY Get the data property 'dy'. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% DESCRIPTION: Get the data property 'dy'. +% +% CALL: val = obj.dy(); +% +% INPUTS: obj - must be a single data2D object. +% +% <a href="matlab:utils.helper.displayMethodInfo('ao', 'dy')">Parameters Description</a> +% +% VERSION: $Id: dy.m,v 1.10 2011/06/20 16:52:19 ingo Exp $ +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +function varargout = dy(varargin) + + % Check if this is a call for parameters + if utils.helper.isinfocall(varargin{:}) + varargout{1} = getInfo(varargin{3}); + return + end + + % Collect numeric and char arguments to pass to getDy + args = {}; + for kk = 1:nargin + if isnumeric(varargin{kk}) || ischar(varargin{kk}) || islogical(varargin{kk}) + args = [args {varargin{kk}}]; + end + end + + as = varargin{1}; + + % Get property + out = []; + for jj = 1:numel(as) + out = [out as(jj).data.getDy(args{:})]; + end + + % Set output + varargout{1} = out; + +end + +%-------------------------------------------------------------------------- +% Get Info Object +%-------------------------------------------------------------------------- +function ii = getInfo(varargin) + if nargin == 1 && strcmpi(varargin{1}, 'None') + sets = {}; + pl = []; + else + sets = {'Default'}; + pl = getDefaultPlist; + end + % Build info object + ii = minfo(mfilename, 'ao', 'ltpda', utils.const.categories.helper, '$Id: dy.m,v 1.10 2011/06/20 16:52:19 ingo Exp $', sets, pl); + ii.setModifier(false); +end + +%-------------------------------------------------------------------------- +% Get Default Plist +%-------------------------------------------------------------------------- +function plout = getDefaultPlist() + persistent pl; + if ~exist('pl', 'var') || isempty(pl) + pl = buildplist(); + end + plout = pl; +end + +function pl = buildplist() + pl = plist.EMPTY_PLIST; +end