Difference between revisions of "Cubic interp.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Sync syntax/arguments/outputs with current Spinach source)
(sync with Spinach main f053e432: Parameters block per head header line structure; stray Returns block moved into Outputs; placeholder Outputs line replaced; author link)
 
(4 intermediate revisions by the same user not shown)
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==
+
==Parameters==
  
−
end_a      - first interpolation boundary in alpha space
+
    end_a      - first interpolation boundary in alpha space
−
        end_b      - second interpolation boundary in alpha space
+
−
        alpha_a    - first interpolation anchor point
+
    end_b      - second interpolation boundary in alpha space
−
        alpha_b    - second interpolation anchor point
+
−
        f_a        - function value at alpha_a
+
    alpha_a    - first interpolation anchor point
−
        dir_der_a  - directional derivative at alpha_a
+
−
        f_b        - function value at alpha_b
+
    alpha_b    - second interpolation anchor point
−
        dir_der_b  - directional derivative at alpha_b
+
−
    Returns:
+
    f_a        - function value at alpha_a
−
        alpha      - selected maximiser of the cubic model
+
−
        fx        - cubic model value at alpha
+
    dir_der_a  - directional derivative at alpha_a
 +
 +
    f_b        - function value at alpha_b
 +
 +
    dir_der_b  - directional derivative at alpha_b
  
 
==Outputs==
 
==Outputs==
  
−
this function produces output as described in source code
+
    alpha      - selected maximiser of the cubic model
 +
 +
    fx        - cubic model value at alpha
  
 
==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]], [[sectioning.m]], [[alpha_conds.m]], [[fmaxnewton.m]], [[bfgs.m]], [[aux_mat.m]], [[dirdiff.m]], [[drifts.m]], [[ensemble.m]], [[hess_reorder.m]], [[objeval.m]], [[optimcon.m]], [[trapdiff.m]], [[Optimal_control_module]]
  
−
* [[bracketing.m]]
+
''Version 2.11, authors: [[David Goodwin]], [[Ilya Kuprov]]''
−
* [[sectioning.m]]
 
−
* [[alpha_conds.m]]
 
−
* [[fmaxnewton.m]]
 
−
* [[bfgs.m]]
 
−
* [[Optimal_control_module]]
 
−
 
 
−
 
 
−
 
 
−
''Version 2.11, authors: David Goodwin, [[Ilya Kuprov]]''
 

Latest revision as of 05:41, 30 August 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)

Parameters

   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

Outputs

   alpha      - selected maximiser of the cubic model

   fx         - cubic model value at alpha

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

bracketing.m, sectioning.m, alpha_conds.m, fmaxnewton.m, bfgs.m, aux_mat.m, dirdiff.m, drifts.m, ensemble.m, hess_reorder.m, objeval.m, optimcon.m, trapdiff.m, Optimal_control_module

Version 2.11, authors: David Goodwin, Ilya Kuprov