changeset 20145:f8d443fe0de3 stable

close.m: Silently accept null argument for Matlab compatibility. * close.m: Check isempty (arg1) and don't complain if arg1 is null.
author Rik <rik@octave.org>
date Wed, 29 Apr 2015 17:09:24 -0700
parents cbce57ca9747
children f0a8c1bc3b60
files scripts/plot/util/close.m
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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