How to pass a vector or function to bvpinit?
Ältere Kommentare anzeigen
my 2nd order ode and boundary conditions look like this:
f = @(x,u) [ u(2); someconstant*x*somefunction(u(1))];
g = @(ya,yb) [ya(1)-bcleft; yb(2)-yb(1)/someconstant2];
then I try the following:
r=linspace(0,someconstant,1000);
y1guessvec=r.*someconstant;
y2guessvec=r.0;
y1guessfun=@(x) x.*someconstant;
neither
solinit=bvpinit(r,[y1guessvec y2guessvec]);
nor
solinit=bvpinit(r,[y1guessvec 0]);
nor
solinit=bvpinit(r,[y1guessvec y2guessvec]);
do work. Unfortunately, the manual is completely useless...there's not a single example besides using some constant [0 0] in bvpinit...
what am I doing wrong?
Antworten (0)
Kategorien
Mehr zu Boundary Value Problems finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!