How to deal with Singular Jacobian error?
1 view (last 30 days)
Show older comments
Hi, I'm running a BVP code, and I keep receiving this error. Error using bvp4c (line 252) Unable to solve the collocation equations -- a singular Jacobian encountered.
Error in mat4bvp (line 4) sol = bvp4c(@mat4ode,@mat4bc,solinit);
Here's the code: function dydx = mat4ode(x,y,omega) dydx = [ y(2) -(((omega*(1-exp(-8*x))*8*exp(-8*x))... /(2*(x^2)))-(pi^2/(32*x)))*y(1)]; end
function res = mat4bc(ya,yb,omega) res = [ ya(1) yb(1) ya(2)-1 ];
function yinit = mat4init(x) yinit = [ (1/(2*pi))*sin(2*pi*x) cos(2*pi*x) ];
function mat4bvp omega=0.8057; solinit = bvpinit(linspace(0,2,10),@mat4init,omega); sol = bvp4c(@mat4ode,@mat4bc,solinit); x = linspace(0,2); y = deval(sol,x); plot(x,y(1,:))
Can anyone plz help me?
0 Comments
Answers (0)
See Also
Categories
Find more on Boundary Value Problems in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!