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 data2D 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.3 2008/09/04 15:29:30 ingo Exp $ HISTORY: 27-05-2008 Diepholz Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
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 data2D 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.3 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 y = varargin{1}.y; 0045 0046 % return always a column vector 0047 if size(y,1) == 1 0048 y = y.'; 0049 end 0050 0051 %%% get y values 0052 if isempty(idx) 0053 varargout{1} = y; 0054 else 0055 varargout{1} = y(idx); 0056 end 0057 end 0058 0059 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0060 % Local Functions % 0061 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0062 0063 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0064 % 0065 % FUNCTION: getInfo 0066 % 0067 % DESCRIPTION: Get Info Object 0068 % 0069 % HISTORY: 11-07-07 M Hewitson 0070 % Creation. 0071 % 0072 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0073 0074 function ii = getInfo(varargin) 0075 if nargin == 1 && strcmpi(varargin{1}, 'None') 0076 sets = {}; 0077 pl = []; 0078 else 0079 sets = {'Default'}; 0080 pl = getDefaultPlist; 0081 end 0082 % Build info object 0083 ii = minfo(mfilename, 'data2D', '', utils.const.categories.internal, '$Id: getY.m,v 1.3 2008/09/04 15:29:30 ingo Exp $', sets, pl); 0084 end 0085 0086 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0087 % 0088 % FUNCTION: getDefaultPlist 0089 % 0090 % DESCRIPTION: Get Default Plist 0091 % 0092 % HISTORY: 11-07-07 M Hewitson 0093 % Creation. 0094 % 0095 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0096 0097 function plo = getDefaultPlist() 0098 plo = plist(); 0099 end 0100