How to deal with Singular Jacobian error?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Boundary Value Problems finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!