How to deal with Singular Jacobian error?

조회 수: 2 (최근 30일)
kyana shayan
kyana shayan 2015년 9월 2일
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개)

카테고리

Help CenterFile Exchange에서 Boundary Value Problems에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by