Mercurial > repos > public > sbplib
diff Map.m @ 1033:037f203b9bf5 feature/burgers1d
Merge with branch feature/advectioRV to utilize the +rv package
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Thu, 17 Jan 2019 10:44:12 +0100 |
parents | a6c5e73ff44e |
children |
line wrap: on
line diff
--- a/Map.m Fri Oct 12 08:50:25 2018 +0200 +++ b/Map.m Thu Jan 17 10:44:12 2019 +0100 @@ -59,6 +59,9 @@ function v = subsref(obj, S) switch S(1).type case '()' + if length(S.subs) > 1 + error('sbplib:Map:multipleKeys', 'Multiple dimensions are not supported. Use a cell array as a key instead.'); + end k = S.subs{1}; try v = get(obj, k); @@ -81,6 +84,9 @@ function obj = subsasgn(obj, S, v); switch S(1).type case '()' + if length(S.subs) > 1 + error('sbplib:Map:multipleKeys', 'Multiple dimensions are not supported. Use a cell array as a key instead.'); + end k = S.subs{1}; set(obj, k, v); otherwise