# HG changeset patch # User Rik # Date 1712279780 25200 # Node ID 87a54302d126ebe6e2aba054b6f7660e7edecc97 # Parent 0d2a6a831574fc2e5b7c196da02dba97c8680adc doc: Fix Texinfo problems in cset 0d2a6a831574 * nonlin.txi: Use Texinfo '@@' macro to generate AT symbol. Call Texinfo @result{} macro with mandatory braces. Place @group/@end group macros within @example block. Fix naming of @ref to "Anonymous Functions". * fminsearch.m: Delete extra space between two words. diff -r 0d2a6a831574 -r 87a54302d126 doc/interpreter/nonlin.txi --- a/doc/interpreter/nonlin.txi Thu Apr 04 15:13:32 2024 -0400 +++ b/doc/interpreter/nonlin.txi Thu Apr 04 18:16:20 2024 -0700 @@ -197,32 +197,32 @@ the function, @code{F}, being minimized. E.g., @w{@code{F = F(x, C)}}. Octave's minimizer functions are designed to only pass one optimization variable to @code{F}, but parameter passing can be accomplished by defining -an @ref{Anonymous Function} that contains the necessargy parameter(s). See +an @ref{Anonymous Functions} that contains the necessary parameter(s). See the example below: +@example @group -@example A = 2; B = 3; -f = @(x) sin (A*x + B); +f = @@(x) sin (A*x + B); fminbnd (f, 0, 2) -@result 0.8562 +@result{} 0.8562 +@end group @end example -@end group Note that anonymous functions retain the value of parameters at the time they are defined. Changing a parameter value after function definition will not affect output of the function until it is redefined: +@example @group -@example B = 4; fminbnd (f, 0, 2) -@result 0.8562 -f = @(x) sin (A*x + B); +@result{} 0.8562 +f = @@(x) sin (A*x + B); fminbnd (f, 0, 2) -@result 0.3562 +@result{} 0.3562 +@end group @end example -@end group The function @code{humps} is a useful function for testing zero and extrema finding functions. diff -r 0d2a6a831574 -r 87a54302d126 scripts/optimization/fminsearch.m --- a/scripts/optimization/fminsearch.m Thu Apr 04 15:13:32 2024 -0400 +++ b/scripts/optimization/fminsearch.m Thu Apr 04 18:16:20 2024 -0700 @@ -123,7 +123,7 @@ ## @item ## The legacy, undocumented syntax for passing parameters to @var{fcn} by ## appending them to the input argument list after @var{options} is -## discouraged and will be completely removed in Octave 10. The +## discouraged and will be completely removed in Octave 10. The ## preferred, cross-platform compatible method of passing parameters to ## @var{fcn} is through use of @ref{Anonymous Functions}. For specific ## examples of doing so for @code{fminsearch} and other minimization