SUBSREF Define field name indexing for provenance objects. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: SUBSREF Define field name indexing for provenance 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 provenance objects. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: SUBSREF Define field name indexing for provenance 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 varargout = subsref(p, index) 0019 % % SUBSREF Define field name indexing for provenance objects. 0020 % % 0021 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0022 % % 0023 % % DESCRIPTION: SUBSREF Define field name indexing for provenance objects. 0024 % % 0025 % % EXAMPLES: 0026 % % 0027 % % nesting level == 1 0028 % % 0029 % % >> creator = p.creator; 0030 % % >> created = p.created; 0031 % % >> ip = p.ipaddress; 0032 % % >> hostname = p.hostname; 0033 % % >> os = p.os; 0034 % % >> matlab_version = p.matlab_version; 0035 % % >> sigproc_version = p.sigproc_version; 0036 % % >> ltpda_version = p.ltpda_version; 0037 % % 0038 % % VERSION: $Id: subsref.m,v 1.2 2007/08/01 13:55:52 ingo Exp $ 0039 % % 0040 % % HISTORY: 14-06-07 Diepholz 0041 % % Creation 0042 % % 0043 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0044 % 0045 % switch length(index) 0046 % case 1 0047 % switch index.type 0048 % 0049 % % INFO: p = p(2) not possible 0050 % case '()' 0051 % error('### the ''()'' indexing is not supported. IF it is necessary code me up'); 0052 % 0053 % % INGO: creator = p.creator; 0054 % % created = p.created; 0055 % % ip = p.ipaddress; 0056 % % ... 0057 % case '.' 0058 % fieldName = index.subs; 0059 % eval(sprintf('varargout{1} = p.%s;', fieldName)); 0060 % 0061 % otherwise 0062 % error('### only ''.'' indexing method for provenance objects is allowed.'); 0063 % end 0064 % otherwise 0065 % error('### nesting level for provenance objects is too large.'); 0066 % end 0067 % 0068 % % END 0069 %