Home > classes > @specwin > subsref.m

subsref

PURPOSE ^

SUBSREF Define field name indexing for specwin objects.

SYNOPSIS ^

function b = subsref(w, index)

DESCRIPTION ^

 SUBSREF Define field name indexing for specwin objects.
 
 M Hewitson 31-01-07
 
 $Id: subsref.html,v 1.1 2007/06/08 14:15:07 hewitson Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function b = subsref(w, index)
0002 
0003 % SUBSREF Define field name indexing for specwin objects.
0004 %
0005 % M Hewitson 31-01-07
0006 %
0007 % $Id: subsref.html,v 1.1 2007/06/08 14:15:07 hewitson Exp $
0008 %
0009 
0010 b = [];
0011 
0012 fieldName = '';
0013 switch length(index)
0014   case 1   % fsd(1:10) or fsd.f or fsd.xx
0015     switch index.type
0016       case '()'
0017         error('### () indexing not supported for analysis objects');
0018       case '.'
0019         fieldName = index.subs;
0020         eval(sprintf('b = w.%s;', fieldName));        
0021       otherwise
0022         error('### unknown indexing method for fsdata objects.');
0023     end
0024   otherwise
0025     error('### unknown indexing method for fsdata objects.');
0026 end
0027 
0028 % END
0029

Generated on Fri 08-Jun-2007 16:09:11 by m2html © 2003