comparison src/lu.cc @ 712:36ba0576bd1b

[project @ 1994-09-19 14:18:15 by jwe]
author jwe
date Mon, 19 Sep 1994 14:18:48 +0000
parents 0a81458ef677
children e81d3a66725e
comparison
equal deleted inserted replaced
711:5f15ab42a631 712:36ba0576bd1b
38 DEFUN_DLD_BUILTIN ("lu", Flu, Slu, 2, 3, 38 DEFUN_DLD_BUILTIN ("lu", Flu, Slu, 2, 3,
39 "[L, U, P] = lu (A): LU factorization") 39 "[L, U, P] = lu (A): LU factorization")
40 { 40 {
41 Octave_object retval; 41 Octave_object retval;
42 42
43 if (args.length () != 2 || nargout > 3) 43 int nargin = args.length ();
44
45 if (nargin != 1 || nargout > 3)
44 { 46 {
45 print_usage ("lu"); 47 print_usage ("lu");
46 return retval; 48 return retval;
47 } 49 }
48 50
49 tree_constant arg = args(1); 51 tree_constant arg = args(0);
50 52
51 int nr = arg.rows (); 53 int nr = arg.rows ();
52 int nc = arg.columns (); 54 int nc = arg.columns ();
53 55
54 if (empty_arg ("lu", nr, nc) < 0) 56 if (empty_arg ("lu", nr, nc) < 0)