How to deal with Singular Jacobian error?

1 回表示 (過去 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 Center および File ExchangeNumerical Integration and Differential Equations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by