Mercurial > hg > octave-nkf
diff src/data.cc @ 5604:2857357f9d3c
[project @ 2006-01-31 18:22:59 by jwe]
author | jwe |
---|---|
date | Tue, 31 Jan 2006 18:23:00 +0000 |
parents | dfa2da0563e5 |
children | 4b33d802ef3c |
line wrap: on
line diff
--- a/src/data.cc +++ b/src/data.cc @@ -1094,6 +1094,27 @@ return retval; } +DEFUN (nzmax, args, , + "-*- texinfo -*-\n\ +@deftypefn {Loadable Function} {@var{scalar} =} nzmax (@var{SM})\n\ +Return the amount of storage allocated to the sparse matrix @var{SM}.\n\ +Note that Octave tends to crop unused memory at the first oppurtunity\n\ +for sparse objects. There are some cases of user created sparse objects\n\ +where the value returned by @dfn{nzmaz} will not be the same as @dfn{nnz},\n\ +but in general they will give the same result.\n\ +@seealso{sparse, spalloc}\n\ +@end deftypefn") +{ + octave_value retval; + + if (args.length() == 1) + retval = args(0).nzmax (); + else + print_usage ("nzmax"); + + return retval; +} + DEFUN (sum, args, , "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} sum (@var{x}, @var{dim})\n\