# HG changeset patch # User jwe # Date 1198173216 0 # Node ID 55f35e469c43745ef7e00277097a3e089bc83bf3 # Parent bf3fb3477d2a7637d47873e101108219845bfd1c [project @ 2007-12-20 17:53:36 by jwe] diff -r bf3fb3477d2a -r 55f35e469c43 doc/interpreter/sparse.txi --- a/doc/interpreter/sparse.txi Thu Dec 20 16:55:26 2007 +0000 +++ b/doc/interpreter/sparse.txi Thu Dec 20 17:53:36 2007 +0000 @@ -535,9 +535,12 @@ 0 0 1 @end example -returns a full matrix as can be seen. Additionally all sparse functions -test the amount of memory occupied by the sparse matrix to see if the -amount of storage used is larger than the amount used by the full +returns a full matrix as can be seen. + + +Additionally, if @code{sparse_auto_mutate} is true, all sparse functions +test the amount of memory occupied by the sparse matrix to see if the +amount of storage used is larger than the amount used by the full equivalent. Therefore @code{speye (2) * 1} will return a full matrix as the memory used is smaller for the full version than the sparse version. @@ -564,6 +567,11 @@ always returns a sparse matrix, even if the memory used will be larger than its full representation. +@DOCSTRING(sparse_auto_mutate) + +Note that the @code{sparse_auto_mutate} option is incompatible with +@sc{Matlab}, and so it is off by default. + @node MathConsiderations, , ReturnType, Operators and Functions @subsubsection Mathematical Considerations diff -r bf3fb3477d2a -r 55f35e469c43 scripts/miscellaneous/edit.m --- a/scripts/miscellaneous/edit.m Thu Dec 20 16:55:26 2007 +0000 +++ b/scripts/miscellaneous/edit.m Thu Dec 20 17:53:36 2007 +0000 @@ -413,7 +413,7 @@ ent = getpwuid (getuid); if (! isstruct (ent)) ret = getenv ("USER"); - if (isempty ()) + if (isempty (ret)) ret = getenv ("USERNAME"); endif elseif (long_form)