Code covered by the BSD License  

Highlights from
Statistical Learning Toolbox

from Statistical Learning Toolbox by Dahua Lin
Functions for statistical learning, pattern recognition and computer vision, covering many topics.

Description of subsref
Home > sltoolbox > ExpDL > @dataset > subsref.m

subsref

PURPOSE ^

SUBSREF Get the properties by subscription

SYNOPSIS ^

function R = subsref(DS, ss)

DESCRIPTION ^

SUBSREF Get the properties by subscription

 $ Syntax $
   - R = DS.<propname>
   - R = DS.('<propname>')
   
 $ History $
   - Created by Dahua Lin on Jul 23, 2006

CROSS-REFERENCE INFORMATION ^

This function calls:
  • get GET gets the properties of the dataset
  • subsref SUBSREF Get the properties by subscription
  • get GET Gets properties of a logger
  • subsref SUBSREF Get the properties by subscription
This function is called by:
  • subsref SUBSREF Get the properties by subscription
  • subsref SUBSREF Get the properties by subscription

SOURCE CODE ^

0001 function R = subsref(DS, ss)
0002 %SUBSREF Get the properties by subscription
0003 %
0004 % $ Syntax $
0005 %   - R = DS.<propname>
0006 %   - R = DS.('<propname>')
0007 %
0008 % $ History $
0009 %   - Created by Dahua Lin on Jul 23, 2006
0010 %
0011 
0012 if ss(1).type == '.' && ischar(ss(1).subs)
0013     R = get(DS, ss(1).subs);
0014     if (length(ss) >= 2)
0015         R = subsref(R, ss(2:end));
0016     end    
0017 else
0018     error('dsdml:invalidarg', 'Invalid subscription for dataset');
0019 end
0020 
0021

Generated on Wed 20-Sep-2006 12:43:11 by m2html © 2003

Contact us at files@mathworks.com