Mercurial > hg > octave-nkf
diff scripts/plot/__errcomm__.m @ 6302:a5cd8b77e892
[project @ 2007-02-13 08:08:33 by jwe]
author | jwe |
---|---|
date | Tue, 13 Feb 2007 08:10:51 +0000 |
parents | 44c91c5dfe1d |
children | 2005c0169e36 |
line wrap: on
line diff
--- a/scripts/plot/__errcomm__.m +++ b/scripts/plot/__errcomm__.m @@ -28,7 +28,7 @@ ## Author: Teemu Ikonen <tpikonen@pcu.helsinki.fi> ## Keywords: errorbar, plotting -function __errcomm__ (caller, h, varargin) +function retval = __errcomm__ (caller, h, varargin) if (nargin < 4) print_usage (); @@ -37,6 +37,7 @@ nargs = length (varargin); k = 1; + idx = 1; data = cell(6,1); while (k <= nargs) a = varargin{k++}; @@ -53,7 +54,7 @@ while (k <= nargs) a = varargin{k++}; if (ischar (a) || iscellstr (a)) - __errplot__ (a, h, data{1:ndata}); + retval(idx++) = __errplot__ (a, h, data{1:ndata}); break; elseif (isvector (a)) a = a(:); @@ -73,7 +74,7 @@ endwhile if (! (ischar (a) || iscellstr (a))) - __errplot__ ("~", h, data{1:ndata}); + retval(idx++) = __errplot__ ("~", h, data{1:ndata}); endif drawnow ();