There are three parts to this problem:
1. Error: Too many input arguments.
solinit = bvpinit(linspace(0,infinity,2),[25 0]);
2. Even with this change you will see an error that the defined constants are not available inside the functions.
sol = bvp4c(@(x,y) fsode(x,y,rsco,rje,rd,beta_,pac,pev,fi_), ...
@(y0,y1) fsbc(y0,y1,rsco,rje,rd,beta_,pac,pev,fi_),...
solinit);
function dfdeta = fsode(x,y,rsco,rje,rd,beta_,pac,pev,fi_)
dfdeta = [y(2)
(4/beta_)*((y(1))^(1/4)-1)];
end
function res = fsbc(y0,y1,rsco,rje,rd,beta_,pac,pev,fi_)
res = [y0(1)
-((4*fi_)/beta_)*(y1(1)^(1/4)-1+pac-pev)];
end
3. With these changes, the script would compile but might throw warnings.
If you see the warning: Unable to meet the tolerance without using more than 5000 mesh points...
You could experiment with appropriate initial choices and boundary conditions. You can also refer to the answer here for some ideas. Here are a couple of examples from the Docs which should help you better understand how the bvp4c and the bvpinit functions can be used:
Best Answer