rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
subsref.m
1 function res = subsref(df, S)
2 %function res = subsref(df, S)
3 %
4 % function allowing access to member-variables of df
5 % this simplifies use remarkably, although also some
6 % private member-variables can be read, so data-capsulation is
7 % slighlty violated by this. lternative would be to provide around
8 % 20 methods for access to all data fields. Therefore this is the
9 % better compromise.
10 %
11 % additionally, the operator() is overloaded: Now this is a local
12 % evaluation of ldg functions. This enables identical syntax for
13 % evlauating analytical or discrete functions with arguments
14 % (einds, lcoord, grid, params)
15 
16 % Bernard Haasdonk 9.5.2007
17 
18 if S(1).type~='('
19  res = builtin('subsref', df, S);
20 else
21  res = evaluate(df,S.subs{:});
22 end;%| \docupdate