rbmatlab 0.10.01
|
00001 function res = subsref(df, S) 00002 %function res = subsref(df, S) 00003 % 00004 % function allowing access to member-variables of df 00005 % this simplifies use remarkably, although also some 00006 % private member-variables can be read, so data-capsulation is 00007 % slighlty violated by this. lternative would be to provide around 00008 % 20 methods for access to all data fields. Therefore this is the 00009 % better compromise. 00010 % 00011 % additionally, the operator() is overloaded: Now this is a local 00012 % evaluation of ldg functions. This enables identical syntax for 00013 % evlauating analytical or discrete functions with arguments 00014 % (einds, lcoord, grid, params) 00015 00016 % Bernard Haasdonk 9.5.2007 00017 00018 if S(1).type~='(' 00019 res = builtin('subsref', df, S); 00020 else 00021 res = evaluate(df,S.subs{:}); 00022 end;%| \docupdate