📄 ex17ch3.m
字号:
function sol = ex17ch3solinit = bvpinit(linspace(0,1,5),[0.5 0]);sol = bvp4c(@odes,@bcs,solinit);plot(sol.x,sol.y(1,:));fprintf('Other authors report y(0) = 0.63678, y(1) = 0.45759.\n');fprintf('Values computed are y(0) = %7.5f, y(1) = %7.5f\n',... sol.y(1,1),sol.y(1,end));%=================================================function dydx = odes(x,y)dydx = [ y(2) y(2) + 2*y(1)^2 ];function res = bcs(ya,yb)res = [ ya(2) - (ya(1) - 1) yb(2) ];
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -