AM_coefficients
Coefficients for the mth-order Adams-Moulton corrector.
Back to IVP Solver Toolbox Contents.
Contents
Syntax
[num,gcd] = AM_coefficients(m)
AM_coefficients(m,'print')
Description
[num,gcd] = AM_coefficients(m) returns a vector of numerators, num, and the greatest common denominator, gcd, of the vector storing the coefficients of the mth-order Adams-Moulton corrector.
AM_coefficients(m,'print') prints the coefficients of the mth-order Adams-Moulton corrector to the Command Window.
Input/Output Parameters
Variable | Symbol | Description | Format | |
Input | m | order of Adams-Moulton corrector | 1×1 double |
|
- | (OPTIONAL) specify as 'print' if you want to print the coefficients to the command window | char | ||
Output | num | - | vector storing the numerators of , where stores the coefficients of the mth-order Adams-Moulton corrector | n×1 double |
gcd | - | greatest common denimonator of | 1×1 double |
NOTE: This function assumes the Adams-Moulton corrector is written as
Example #1
Return the numerators and denominators of the coefficients of the 3rd-order Adams-Moulton corrector.
AM_coefficients returns two quantities; num stores the numerators of the coefficients, while gcd stores the greatest common divisor of the coefficients. The numerators in num are already scaled to be used with gcd.
[num,gcd] = AM_coefficients(3)
num = 5 8 -1 gcd = 12
Example #2
Print the coefficients of the 3rd-order Adams-Moulton corrector.
AM_coefficients(3,'print');
3th-order Adams-Moulton corrector coefficients: b(1) = 5/12 b(2) = 8/12 b(3) = -1/12
See also
AB_coefficients | AB_predictor | AM_corrector | ABM_equations