changeset 17649:f957fa0d2748

Allow scalar,vector inputs to match a matrix input for errorbar plots. * scripts/plot/draw/private/__errcomm__.m: Allow scalar,vector inputs to match a matrix input for errorbar plots.
author Rik <rik@octave.org>
date Mon, 07 Oct 2013 17:23:17 -0700
parents 539aea0e59f4
children 4b65355a31f2
files scripts/plot/draw/private/__errcomm__.m
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/draw/private/__errcomm__.m
+++ b/scripts/plot/draw/private/__errcomm__.m
@@ -58,7 +58,8 @@
       if (isvector (arg))
         arg = arg(:);
       endif
-      if (any (size (arg) != sz))
+      if (! isscalar (arg) && ((isvector (arg) && numel (arg) != prod (sz))
+          || any (size (arg) != sz)))
         error ("%s: size of argument %d does not match others", caller, k-1);
       endif
       data{++ndata} = arg;