# HG changeset patch # User Rik # Date 1430352564 25200 # Node ID f8d443fe0de3b5e4d0c3468d0fcdfe605fa57936 # Parent cbce57ca9747bc8d582f2830dedc060a82b5793e close.m: Silently accept null argument for Matlab compatibility. * close.m: Check isempty (arg1) and don't complain if arg1 is null. diff -r cbce57ca9747 -r f8d443fe0de3 scripts/plot/util/close.m --- a/scripts/plot/util/close.m Wed Apr 29 00:54:37 2015 -0400 +++ b/scripts/plot/util/close.m Wed Apr 29 17:09:24 2015 -0700 @@ -71,6 +71,8 @@ figs = figs(isfigure (figs)); elseif (any (isfigure (arg1))) figs = arg1(isfigure (arg1)); + elseif (isempty (arg1)) + figs = []; # Silently accept null argument for Matlab compatibility else error ('close: first argument must be "all" or a figure handle'); endif