diff Map.m @ 979:7a5e770974ed feature/timesteppers

Merge with default
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 07 Jan 2019 16:26:00 +0100
parents a6c5e73ff44e
children
line wrap: on
line diff
--- a/Map.m	Mon Dec 03 16:49:43 2018 -0800
+++ b/Map.m	Mon Jan 07 16:26:00 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