From c862fdfbb760cb6017afef94b14a7991c9bc571f Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Mon, 10 Feb 2014 16:14:57 +0100 Subject: [PATCH] reporting: let subsasgn take {} ref --- matlab/reporting/@graph/subsasgn.m | 3 +++ matlab/reporting/@report_table/subsasgn.m | 3 +++ matlab/reporting/@vspace/subsasgn.m | 3 +++ 3 files changed, 9 insertions(+) diff --git a/matlab/reporting/@graph/subsasgn.m b/matlab/reporting/@graph/subsasgn.m index fb645de5b..e178825d4 100644 --- a/matlab/reporting/@graph/subsasgn.m +++ b/matlab/reporting/@graph/subsasgn.m @@ -40,6 +40,9 @@ switch S.type otherwise error(['@graph.subsasgn: field ' S.subs 'does not exist']); end + case '{}' + assert(isint(S.subs{1})); + B{S.subs{1}} = V; otherwise error('@graph.subsasgn: syntax error'); end diff --git a/matlab/reporting/@report_table/subsasgn.m b/matlab/reporting/@report_table/subsasgn.m index 2e2dc300d..9ea3b0b76 100644 --- a/matlab/reporting/@report_table/subsasgn.m +++ b/matlab/reporting/@report_table/subsasgn.m @@ -36,6 +36,9 @@ switch S.type otherwise error(['@report_table.subsasgn: field ' S.subs 'does not exist in the report_table class']) end + case '{}' + assert(isint(S.subs{1})); + B{S.subs{1}} = V; otherwise error('@report_table.subsasgn: syntax error') end diff --git a/matlab/reporting/@vspace/subsasgn.m b/matlab/reporting/@vspace/subsasgn.m index 82c444722..3b9cbe82f 100644 --- a/matlab/reporting/@vspace/subsasgn.m +++ b/matlab/reporting/@vspace/subsasgn.m @@ -40,6 +40,9 @@ switch S.type otherwise error(['@vspace.subsasgn: field ' S.subs 'does not exist']); end + case '{}' + assert(isint(S.subs{1})); + B{S.subs{1}} = V; otherwise error('@vspace.subsasgn: syntax error'); end