Matlab Code
Matlab Code
%[f; f'; f''] = [y(1); y(2); y(3)] so that dy/dEta = y' = [f'; f''; f'''] =
[x,y] = shooting;
plot(y(:,1),x,'k-','Linewidth',2)
plot(y(:,2),x,'r-','Linewidth',2)
plot(y(:,3),x,'b-','Linewidth',2)
figformat
%% Supplementary Functions
% Use fsolve to ensure the boundary function is zero. The result is the
opt = optimset('Display','off','TolFun',1E-20);
F = fsolve(@(F) eval_boundary(F),[0,0,0.33],opt);
[x,y] = solve_ode(F);
end
% bound)
end
[x,y] = solve_ode(F);
g = [f_start
df_start
df_end - 1];
end
function figformat
ylabel('\eta');
xlim([0 2]);
xticks(0:0.5:2);
ylim([0 10]);
h = legend('\it{f}','\it{f}^{(1)}','\it{f^{(2)}}','Location','NorthEast');
legend boxoff;
set(h,'FontSize',18);
axis square
set(0,'defaultaxesfontname',fontname); set(0,'defaulttextfontname',fontname);
fontsize = 20;
set(0,'defaultaxesfontsize',fontsize); set(0,'defaulttextfontsize',fontsize);
end