MATLAB Function Reference    
bvpinit

Form the initial guess for bvp4c

Syntax

Description

solinit = bvpinit(x,v) forms the initial guess for bvp4c in common circumstances.

x is a vector that specifies an initial mesh. If you want to solve the boundary value problem (BVP) on , then specify x(1) as and x(end) as . The function bvp4c adapts this mesh to the solution, so often a guess like x = linspace(a,b,10) suffices. However, in difficult cases, you must place mesh points where the solution changes rapidly. The entries of x must be ordered and distinct, so if , then x(1) < x(2) < ... < x(end), and similarly for .

v is a guess for the solution. It can be either a vector, or a function:

solinit = bvpinit(x,v,parameters) indicates that the BVP involves unknown parameters. Use the vector parameters to provide a guess for all unknown parameters.

solinit is a structure with the following fields. The structure can have any name, but the fields must be named x, y, and parameters.



x
Ordered nodes of the initial mesh.
y
Initial guess for the solution with solinit.y(:,i) a guess for the solution at the node solinit.x(i).
parameters
Optional. A vector that provides an initial guess for unknown parameters.

solinit = bvpinit(sol,[anew bnew]) forms an initial guess on the interval [anew bnew] from a solution sol on an interval . The new interval must be larger than the previous one, so either anew <= a < b <= bnew or anew >= a > b >= bnew. The solution sol is extrapolated to the new interval. If sol contains parameters, they are copied to solinit.

solinit = bvpinit(sol,[anew bnew],parameters) forms solinit as described above, but uses parameters as a guess for unknown parameters in solinit.

See Also

@ (function_handle), bvp4c, bvpget, bvpset, deval


  bvpget bvpset