diff src/ov-fcn-inline.cc @ 12632:2dbac27e0e40 stable

doc: miscellaneous touch-ups to documentation strings * debug.txi: Correct line number for debug example. * func.txi: Correct directory structure of functions shipped with Octave distribution. * edit.m: Eliminate reference to editor used by bug_report. * fzero.m: Add inline function to list of possible inputs. * fplot.m: Add comma to break list of possible inputs. * qqplot.m: Correct example so that it runs under current Octave distributions. * assert.m: Add seealso reference to fail. * fail.m: Add seealso reference to assert. Add additional calling forms of function. * load-path.cc (addpath): Don't use @samp which created double double quotes around option. * ov-fcn-inline.cc (vectorize): Add example usage. * variables.cc (exist): Add seealso link to file_in_loadpath.
author Rik <octave@nomad.inbox5.com>
date Mon, 25 Apr 2011 09:24:33 -0700
parents 7a5aacf65f81
children f96b9b9f141b
line wrap: on
line diff
--- a/src/ov-fcn-inline.cc	Fri Apr 22 09:28:06 2011 -0700
+++ b/src/ov-fcn-inline.cc	Mon Apr 25 09:24:33 2011 -0700
@@ -879,6 +879,17 @@
 Create a vectorized version of the inline function @var{fun}\n\
 by replacing all occurrences of @code{*}, @code{/}, etc., with\n\
 @code{.*}, @code{./}, etc.\n\
+\n\
+This may be useful, for example, when using inline functions with\n\
+numerical integration or optimization where a vector-valued function\n\
+is expected.\n\
+\n\
+@example\n\
+fcn = vectorize (inline (\"x^2 - 1\"))\n\
+   @result{} fcn = f(x) = x.^2 - 1\n\
+quadv (fcn, 0, 3)\n\
+   @result{} 6\n\
+@end example\n\
 @end deftypefn")
 {
   octave_value retval;