FUNCTION REFERENCE

bvp4c

Solve boundary value problems (3-stage Lobatto IIIa collocation).

Solve boundary value problems (3-stage Lobatto IIIa collocation).

Syntax

sol = bvp4c(@odefun, @bcfun, solinit)

Syntax

sol = bvp4c(@odefun, @bcfun, solinit, options, p1, p2, ...)

The three-stage Lobatto IIIA method of Kierzenka and Shampine (2001) uses a C1

cubic collocated at the endpoints and midpoint of each interval. Damped Newton

iterations solve the collocation and boundary equations together. Five-point

Lobatto quadrature estimates each subinterval's L2 norm of the ODE residual,

scaled by max(abs(odefun), AbsTol/RelTol), for mesh refinement. Unknown parameters come from

solinit.parameters (odefun(x,y,p), bcfun(ya,yb,p)). sol has fields solver, x, y, yp,

parameters (if any) and stats; deval evaluates the cubic and its derivative.

Example

sol = bvp4c(@(x,y) [y(2); -y(1)], @(a,b) [a(1); b(1)-1], bvpinit(linspace(0,pi/2,5), [0 0])); deval(sol, 1)   % [0.8414; 0.5403]

Differences from MATLAB: mesh selection, stopping tests, residual estimates, values

and evaluation counts can differ. The dense pivoted LU solve allows at most 3000

unknowns. Multipoint problems and SingularTerm are not supported.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.