SUBSREF Define field name indexing for specwin objects. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: SUBSREF Define field name indexing for specwin objects. EXAMPLES: All possible accesses are possible. VERSION: $Id: subsref.m,v 1.2 2007/08/01 13:55:52 ingo Exp $ HISTORY: 31-01-07 M Hewitson Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 function B = subsref(A, S) 0002 % SUBSREF Define field name indexing for specwin objects. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: SUBSREF Define field name indexing for specwin objects. 0007 % 0008 % EXAMPLES: All possible accesses are possible. 0009 % 0010 % VERSION: $Id: subsref.m,v 1.2 2007/08/01 13:55:52 ingo Exp $ 0011 % 0012 % HISTORY: 31-01-07 M Hewitson 0013 % Creation 0014 % 0015 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0016 B = builtin('subsref', A, S); 0017 0018 % function b = subsref(w, index) 0019 % 0020 % % SUBSREF Define field name indexing for specwin objects. 0021 % % 0022 % % M Hewitson 31-01-07 0023 % % 0024 % % $Id: subsref.m,v 1.2 2007/08/01 13:55:52 ingo Exp $ 0025 % % 0026 % 0027 % b = []; 0028 % 0029 % fieldName = ''; 0030 % switch length(index) 0031 % case 1 % fsd(1:10) or fsd.f or fsd.xx 0032 % switch index.type 0033 % case '()' 0034 % error('### () indexing not supported for analysis objects'); 0035 % case '.' 0036 % fieldName = index.subs; 0037 % eval(sprintf('b = w.%s;', fieldName)); 0038 % otherwise 0039 % error('### unknown indexing method for fsdata objects.'); 0040 % end 0041 % otherwise 0042 % error('### unknown indexing method for fsdata objects.'); 0043 % end 0044 % 0045 % % END 0046 %