61c61 < if (nargin > 6 || nargin < 4 || nargout > 4 || nargout < 2) --- > if (nargin > 6 || nargin < 4 || nargout > 4) 125,126c125,130 < ## convert to the correct output form < if (nargout == 2) --- > ## convert to the correct output form including > ## matlab compatible orientation bug # 49318 > ## note that poly always outputs a row vector > if ((nargout == 0) || (nargout == 1)) #fix bug 49990 > a = real (gain * poly (zero)); > elseif (nargout == 2) 130,131c134,135 < a = zero; < b = pole; --- > a = zero (:); > b = pole (:); 164a169,191 > %% Test output orientation for matlab compatibility (bug #49318) > %% also verify single nargout is valid (bug #49990) > %!test > %! ellip (6, 3, 50, .6); > %! assert (isrow (ans), true); > %!test > %! A = ellip (6, 3, 50, .6); > %! assert (isrow (A), true); > %!test > %! [A, B] = ellip (6, 3, 50, .6); > %! assert (isrow (A), true); > %! assert (isrow (B), true); > %!test > %! [z, p, g] = ellip (6, 3, 50, .6); > %! assert (iscolumn (z), true); > %! assert (iscolumn (p), true); > %! assert (isscalar (g), true); > %!test > %! [a, b, c, d] = ellip (6, 3, 50, .6); > %! assert (ismatrix (a), true); > %! assert (iscolumn (b), true); > %! assert (isrow (c), true); > %! assert (isscalar (d), true);