Difference between revisions of "Cubic interp.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Sync syntax/arguments/outputs with current Spinach source)
(Restore pre-bulk-edit wiki content)
Line 1: Line 1:
 
{{DISPLAYTITLE:cubic_interp.m}} __NOTOC__
 
{{DISPLAYTITLE:cubic_interp.m}} __NOTOC__
 
 
Finds the extremum of a cubic interpolant built from function values and directional derivatives at two points and returns the best point inside the interpolation interval.
 
Finds the extremum of a cubic interpolant built from function values and directional derivatives at two points and returns the best point inside the interpolation interval.
  
 
==Syntax==
 
==Syntax==
  
[alpha,fx]=cubic_interp(end_a,end_b,alpha_a,alpha_b,f_a,dir_der_a,f_b,dir_der_b)
+
      [alpha,fx]=cubic_interp(end_A,end_B,alpha_A,alpha_B,...
 +
                              f_A,dir_deriv_A,f_B,dir_deriv_B)
  
 
==Arguments==
 
==Arguments==
  
end_a      - first interpolation boundary in alpha space
+
        end_a      - first interpolation boundary in alpha space
 
         end_b      - second interpolation boundary in alpha space
 
         end_b      - second interpolation boundary in alpha space
 
         alpha_a    - first interpolation anchor point
 
         alpha_a    - first interpolation anchor point
Line 23: Line 23:
 
==Outputs==
 
==Outputs==
  
this function produces output as described in source code
+
    this function produces output as described in source code
  
 
==Examples==
 
==Examples==
 
 
See examples in the Spinach distribution relevant to this function.
 
See examples in the Spinach distribution relevant to this function.
  
 
==Notes==
 
==Notes==
 
 
This page was generated from the function header in the Spinach repository.
 
This page was generated from the function header in the Spinach repository.
  
 
==See also==
 
==See also==
 
 
* [[bracketing.m]]
 
* [[bracketing.m]]
 
* [[sectioning.m]]
 
* [[sectioning.m]]

Revision as of 15:48, 5 April 2026

Finds the extremum of a cubic interpolant built from function values and directional derivatives at two points and returns the best point inside the interpolation interval.

Syntax

      [alpha,fx]=cubic_interp(end_A,end_B,alpha_A,alpha_B,...
                              f_A,dir_deriv_A,f_B,dir_deriv_B)

Arguments

       end_a      - first interpolation boundary in alpha space
       end_b      - second interpolation boundary in alpha space
       alpha_a    - first interpolation anchor point
       alpha_b    - second interpolation anchor point
       f_a        - function value at alpha_a
       dir_der_a  - directional derivative at alpha_a
       f_b        - function value at alpha_b
       dir_der_b  - directional derivative at alpha_b
    Returns:
       alpha      - selected maximiser of the cubic model
       fx         - cubic model value at alpha

Outputs

    this function produces output as described in source code

Examples

See examples in the Spinach distribution relevant to this function.

Notes

This page was generated from the function header in the Spinach repository.

See also


Version 2.11, authors: David Goodwin, Ilya Kuprov