diff Map.m @ 968:a4ad90b37998 feature/poroelastic

Merge with default.
author Martin Almquist <malmquist@stanford.edu>
date Sun, 23 Dec 2018 14:39:31 +0100
parents a6c5e73ff44e
children
line wrap: on
line diff
--- a/Map.m	Sun Dec 23 14:06:26 2018 +0100
+++ b/Map.m	Sun Dec 23 14:39:31 2018 +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