15.11.2014 Views

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Boundary Value Problems for ODEs<br />

Falkner−Skan equation, positive wall shear, β = 0.5.<br />

1.2<br />

1<br />

0.8<br />

df/dη<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

0 1 2 3 4 5 6<br />

η<br />

5 Use continuation to solve the problem and plot subsequent solutions.<br />

The example then solves the problem for infinity = 4, 5, 6. It uses bvpinit<br />

to extrapolate the solution sol for one value <strong>of</strong> infinity as an initial guess<br />

for the next value <strong>of</strong> infinity. For each iteration, the example prints the<br />

computed value <strong>of</strong> f′′ ( 0)<br />

and superimposes a plot <strong>of</strong> the solution in the<br />

existing figure.<br />

for Bnew = infinity+1:maxinfinity<br />

end<br />

solinit = bvpinit(sol,[0 Bnew]); % Extend solution to Bnew.<br />

sol = bvp4c(@fsode,@fsbc,solinit);<br />

eta = sol.x;<br />

f = sol.y;<br />

fprintf('Value computed using infinity = %g is %7.5f.\n', ...<br />

Bnew,f(3,1))<br />

plot(eta,f(2,:),eta(end),f(2,end),'o');<br />

drawnow<br />

5-79

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!