Mercurial > octave-nkf
comparison scripts/plot/draw/private/__errcomm__.m @ 17594: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 | 7bb76a22cde1 |
children | d63878346099 |
comparison
equal
deleted
inserted
replaced
17593:539aea0e59f4 | 17594:f957fa0d2748 |
---|---|
56 error ("%s: data argument %d must be numeric", caller, k-1); | 56 error ("%s: data argument %d must be numeric", caller, k-1); |
57 endif | 57 endif |
58 if (isvector (arg)) | 58 if (isvector (arg)) |
59 arg = arg(:); | 59 arg = arg(:); |
60 endif | 60 endif |
61 if (any (size (arg) != sz)) | 61 if (! isscalar (arg) && ((isvector (arg) && numel (arg) != prod (sz)) |
62 || any (size (arg) != sz))) | |
62 error ("%s: size of argument %d does not match others", caller, k-1); | 63 error ("%s: size of argument %d does not match others", caller, k-1); |
63 endif | 64 endif |
64 data{++ndata} = arg; | 65 data{++ndata} = arg; |
65 if (ndata > 6) | 66 if (ndata > 6) |
66 error ("%s: too many arguments to plot", caller); | 67 error ("%s: too many arguments to plot", caller); |