Mercurial > hg > octave-lojdl
changeset 7309:26f42a14d4f6
[project @ 2007-12-12 22:05:38 by jwe]
author | jwe |
---|---|
date | Wed, 12 Dec 2007 22:05:38 +0000 |
parents | d8209a80e093 |
children | dc9b00ab5aac |
files | scripts/ChangeLog scripts/linear-algebra/condest.m |
diffstat | 2 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,5 +1,8 @@ 2007-12-12 John W. Eaton <jwe@octave.org> + * linear-algebra/condest.m: Use nargin instead of size(varargin,2). + Allow 6 arguments. + * plot/__go_draw_axes__.m: Handle the axes layer property. 2007-12-12 David Bateman <dbateman@free.fr>
--- a/scripts/linear-algebra/condest.m +++ b/scripts/linear-algebra/condest.m @@ -105,7 +105,7 @@ function [est, v] = condest (varargin) - if size (varargin, 2) < 1 || size (varargin, 2) > 5, + if (nargin < 1 || nargin > 6) print_usage (); endif @@ -118,23 +118,23 @@ endif A = varargin{1}; - if (size (varargin, 2) > 1) + if (nargin > 1) if (isscalar (varargin{2})) t = varargin{2}; else - if (size (varargin, 2) < 3) + if (nargin < 3) error ("condest: must supply both solve and solve_t."); else solve = varargin{2}; solve_t = varargin{3}; - if size (varargin, 2) > 3, + if (nargin > 3) t = varargin{4}; endif endif endif endif else - if (size (varargin, 2) < 5) + if (nargin < 5) error ("condest: implicit form of condest requires at least 5 arguments."); endif apply = varargin{1}; @@ -145,7 +145,7 @@ if (! isscalar (n)) error ("condest: dimension argument of implicit form must be scalar."); endif - if (size (varargin, 2) > 5) + if (nargin > 5) t = varargin{6}; endif endif