diff options
Diffstat (limited to 'sourcecodes/bnt-master/BNT/potentials/@dpot/get_fields.m')
| -rw-r--r-- | sourcecodes/bnt-master/BNT/potentials/@dpot/get_fields.m | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sourcecodes/bnt-master/BNT/potentials/@dpot/get_fields.m b/sourcecodes/bnt-master/BNT/potentials/@dpot/get_fields.m new file mode 100644 index 00000000..2400bc99 --- /dev/null +++ b/sourcecodes/bnt-master/BNT/potentials/@dpot/get_fields.m @@ -0,0 +1,13 @@ +function val = get_params(pot, name) +% GET_PARAMS Accessor function for a field (dpot) +% val = get_params(pot, name) +% +% e.g., get_params(pot, 'table') or 'domain' + +switch name + case 'table', val = pot.T; + case 'domain', val = pot.domain; + otherwise, + error(['invalid field name ' name]); +end + |
