diff doc/interpreter/diagperm.txi @ 19432:9e5b64b3c1fe

Fix up documentation for new disable_[range,diagonal_matrix,permutation_matrix] fcns. * NEWS: Announce new functions disable_range, disable_diagonal_matrix, disable_permutation_matrix. * diagperm.txi: Add example showing space savings from using disable_diagonal_matrix. * ov.cc(Fdisable_range): Correct docstring which had cut-and-paste error documenting disable_permutation_matrix instead. Add seealso links to other disable_xxx functions. * ov.cc(Fdisable_diagonal_matrix, Fdisable_permutation_matrix): Add seealso links to other disable_xxx functions.
author Rik <rik@octave.org>
date Sat, 13 Dec 2014 18:41:03 -0800
parents 385499581a5e
children 0e1f5a750d00
line wrap: on
line diff
--- a/doc/interpreter/diagperm.txi	Thu Dec 11 14:28:43 2014 +0100
+++ b/doc/interpreter/diagperm.txi	Sat Dec 13 18:41:03 2014 -0800
@@ -59,13 +59,26 @@
 Octave provides special treatment of real and complex rectangular diagonal
 matrices, as well as permutation matrices.  They are stored as special objects,
 using efficient storage and algorithms, facilitating writing both readable and
-efficient matrix algebra expressions in the Octave language.  The
-special treatment may be disabled by using the functions
-@dfn{disable_permutation_matrix} and @dfn{disable_diagonal_matrix}
+efficient matrix algebra expressions in the Octave language.  The special
+treatment may be disabled by using the functions @dfn{disable_diagonal_matrix}
+and @dfn{disable_permutation_matrix}.
+
+@DOCSTRING(disable_diagonal_matrix)
 
 @DOCSTRING(disable_permutation_matrix)
 
-@DOCSTRING(disable_diagonal_matrix)
+The space savings are significant as demonstrated by the following code.
+
+@example
+@group
+x = diag (rand (10, 1));
+xf = full (x);
+sizeof (x)
+@result{} 80
+sizeof (xf)
+@result{} 800
+@end group
+@end example
 
 @menu
 * Creating Diagonal Matrices::