diff doc/interpreter/tips.txi @ 10284:c3df189b1b15

more coding tips
author Jaroslav Hajek <highegg@gmail.com>
date Tue, 09 Feb 2010 11:43:03 +0100
parents 09da0bd91412
children 3140cb7a05a1
line wrap: on
line diff
--- a/doc/interpreter/tips.txi	Tue Feb 09 10:48:31 2010 +0100
+++ b/doc/interpreter/tips.txi	Tue Feb 09 11:43:03 2010 +0100
@@ -221,7 +221,7 @@
 @item
 Use @code{cellfun} intelligently.  The @code{cellfun} function is a useful tool
 for avoiding loops.  @xref{Processing Data in Cell Arrays}.
-@code{cellfun} is often use with anonymous function handles; however, calling
+@code{cellfun} is often used with anonymous function handles; however, calling
 an anonymous function involves an overhead quite comparable to the overhead
 of an m-file function.  Passing a handle to a built-in function is faster,
 because the interpreter is not involved in the internal loop.  For example:
@@ -235,6 +235,11 @@
 @end example
 
 @item
+Octave includes a number of other functions that can replace common types of loops,
+including @code{bsxfun}, @code{arrayfun}, @code{structfun}, @code{accumarray}.
+These functions can take an arbitrary function as a handle.
+
+@item
 Avoid calling @code{eval} or @code{feval} excessively, because
 they require Octave to parse input or look up the name of a function in
 the symbol table.