Home > classes > @cdata > getY.m

getY

PURPOSE ^

GETY Get the property 'y'.

SYNOPSIS ^

function varargout = getY(varargin)

DESCRIPTION ^

 GETY Get the property 'y'.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: Get the property 'y'.

 CALL:        val = obj.getY();
              val = obj.getY(idx);
              val = obj.getY(1:10);

 INPUTS:      obj - must be a single cdata object.
              idx - index of the data samples

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

              Get information about a specified set-plist by calling:
              >> fsdata.getInfo('getY', 'None')

 VERSION:     $Id: getY.m,v 1.2 2008/09/04 15:29:30 ingo Exp $

 HISTORY:     27-05-2008 Diepholz
                 Creation

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 % GETY Get the property 'y'.
0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0003 %
0004 % DESCRIPTION: Get the property 'y'.
0005 %
0006 % CALL:        val = obj.getY();
0007 %              val = obj.getY(idx);
0008 %              val = obj.getY(1:10);
0009 %
0010 % INPUTS:      obj - must be a single cdata object.
0011 %              idx - index of the data samples
0012 %
0013 % M-FILE INFO: Get information about this methods by calling
0014 %              >> fsdata.getInfo('getY')
0015 %
0016 %              Get information about a specified set-plist by calling:
0017 %              >> fsdata.getInfo('getY', 'None')
0018 %
0019 % VERSION:     $Id: getY.m,v 1.2 2008/09/04 15:29:30 ingo Exp $
0020 %
0021 % HISTORY:     27-05-2008 Diepholz
0022 %                 Creation
0023 %
0024 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0025 
0026 function varargout = getY(varargin)
0027 
0028   %%% Check if this is a call for parameters
0029   if utils.helper.isinfocall(varargin{:})
0030     varargout{1} = getInfo(varargin{3});
0031     return
0032   end
0033 
0034   %%% get idx
0035   idx = [];
0036   if nargin == 2
0037     if isnumeric(varargin{2})
0038       idx = varargin{2};
0039     else
0040       error('### Unknown arguments to getY.');
0041     end
0042   end
0043 
0044   %%% get y values
0045   if isempty(idx)
0046     varargout{1} = varargin{1}.y;
0047   else
0048     varargout{1} = varargin{1}.y(idx);
0049   end
0050 end
0051 
0052 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0053 %                               Local Functions                               %
0054 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0055 
0056 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0057 %
0058 % FUNCTION:    getInfo
0059 %
0060 % DESCRIPTION: Get Info Object
0061 %
0062 % HISTORY:     11-07-07 M Hewitson
0063 %                Creation.
0064 %
0065 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0066 
0067 function ii = getInfo(varargin)
0068   if nargin == 1 && strcmpi(varargin{1}, 'None')
0069     sets = {};
0070     pl   = [];
0071   else
0072     sets = {'Default'};
0073     pl   = getDefaultPlist;
0074   end
0075   % Build info object
0076   ii = minfo(mfilename, 'cdata', '', utils.const.categories.internal, '$Id: getY.m,v 1.2 2008/09/04 15:29:30 ingo Exp $', sets, pl);
0077 end
0078 
0079 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0080 %
0081 % FUNCTION:    getDefaultPlist
0082 %
0083 % DESCRIPTION: Get Default Plist
0084 %
0085 % HISTORY:     11-07-07 M Hewitson
0086 %                Creation.
0087 %
0088 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0089 
0090 function plo = getDefaultPlist()
0091   plo = plist();
0092 end
0093

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