## Documentation Center |

Form guess structure for extending boundary value solutions

`solinit = bvpxtend(sol,xnew,ynew)solinit = bvpxtend(sol,xnew,extrap)solinit = bvpxtend(sol,xnew)solinit = bvpxtend(sol,xnew,ynew,pnew)solinit
= bvpxtend(sol,xnew,extrap,pnew)`

`solinit = bvpxtend(sol,xnew,ynew)` uses
solution `sol` computed on `[a,b]` to
form a solution guess for the interval extended to `xnew`.
The extension point `xnew` must be outside the interval `[a,b]`,
but on either side. The vector `ynew` provides an
initial guess for the solution at `xnew`.

`solinit = bvpxtend(sol,xnew,extrap)` forms
the guess at `xnew` by extrapolating the solution `sol`. `extrap` is
a string that determines the extrapolation method. `extrap` has
three possible values:

`'constant'`—`ynew`is a value nearer to end point of solution in`sol`.`'linear'`—`ynew`is a value at`xnew`of linear interpolant to the value and slope at the nearer end point of solution in`sol`.`'solution'`—`ynew`is the value of (cubic) solution in`sol`at`xnew`.

The value of `extrap` is case-insensitive
and only the leading, unique portion needs to be specified.

`solinit = bvpxtend(sol,xnew)` uses
the extrapolating solution where `extrap` is `'constant'`.
If there are unknown parameters, values present in `sol` are
used as the initial guess for parameters in `solinit`.

`solinit = bvpxtend(sol,xnew,ynew,pnew)` specifies
a different guess `pnew`. `pnew` can
be used with extrapolation, using the syntax `solinit
= bvpxtend(sol,xnew,extrap,pnew)`. To modify parameters
without changing the interval, use `[]` as place
holder for `xnew` and `ynew`.

Was this topic helpful?