# HG changeset patch # User Lachlan # Date 1453783941 -39600 # Node ID f982cfe3df03b8348f26d6cf06dd5fc230643c93 # Parent e5cf0a9df3a2b94bcef7426882659f89ee929a84 When concatenating cells, suppress empty matrices (bug #43511). * pt-mat.cc (cellify): Replace [] by {}, not by {[]}. * __patch__.m: Change concatenation to guarantee reproducibility. diff -r e5cf0a9df3a2 -r f982cfe3df03 libinterp/parse-tree/pt-mat.cc --- a/libinterp/parse-tree/pt-mat.cc Sun Feb 14 13:48:06 2016 -0800 +++ b/libinterp/parse-tree/pt-mat.cc Tue Jan 26 15:52:21 2016 +1100 @@ -427,7 +427,10 @@ { elt_changed = true; - *p = Cell (*p); + if (p->is_empty ()) + *p = Cell (); + else + *p = Cell (*p); } } @@ -1383,5 +1386,7 @@ %! string_fill_char (orig_val); %! assert (string_fill_char (), orig_val); +%!assert ( [ [], {1} ], {1} ) + %!error (string_fill_char (1, 2)) */ diff -r e5cf0a9df3a2 -r f982cfe3df03 scripts/plot/draw/private/__patch__.m --- a/scripts/plot/draw/private/__patch__.m Sun Feb 14 13:48:06 2016 -0800 +++ b/scripts/plot/draw/private/__patch__.m Tue Jan 26 15:52:21 2016 +1100 @@ -42,7 +42,7 @@ fvc = cell (1, 2*numfields (fvs)); fvc(1:2:end) = fieldnames (fvs); fvc(2:2:end) = struct2cell (fvs); - args = [fvc{:}, varargin(2:end)]; + args = [fvc(:)', varargin(2:end)]; else failed = true; endif