필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Error using bvp4, "singular Jacobian", when I am decreasing the value of a parameter of my equation

조회 수: 1 (최근 30일)
I am solving a set of linear equations (reduced from a fourth order differential equations with variables coefficients) using bvp4, when I reduce the value of r2 (parameter) below 50e-9 its showing error. Any suggestions please????
clear all
close all
clc
global r1 m L mu Ao A1 A2 A3 A4 w
%%%%%parameters %%%%
L=50e-6;
r1=200e-9;
r2=10e-9;
E=1e+6;
w=35;
mu=0.001;
rh=0.3*L;
amp=1;
T=2*pi/w;
dpoint=100;
m=-(r1-r2)/L;
rav=(r1+r2)/2;
Ao=(E*pi*r1^4)/4;
A1=E*pi*r1^3*m;
A2=(3/2)*E*pi*r1^2*m^2;
A3=E*pi*r1*m^3;
A4=(E*pi*m^4)/4;
SolYinit = bvpinit(linspace(0,L,dpoint), [0; 0; 0; 0]);
Fsol = bvp4c(@hode, @hbc, SolYinit);
xcor=Fsol.x;
ycor=(Fsol.y);
%%%%%%%%%%%%%
function dydx = hode(x,y)
global r1 m L mu Ao A1 A2 A3 A4 w
r=r1+m*x;
Cn=4.*pi.*mu./(log(L./r)+0.5);
A=Ao+(A1.*x)+(A2.*x.^2)+(A3.*x.^3)+(A4.*x.^4);
Ax=A1+(2.*A2.*x)+(3.*A3.*x.^2)+(4.*A4.*x.^3);
Axx=(2.*A2)+(6.*A3.*x)+(12.*A4.*x.^2);
dydx=[y(2); y(3); y(4); (-1/A)*((2*Ax*y(4))+(Axx*y(3))+(1i*w*Cn*y(1)))];
%%%%%%%%%%%%%%%
function res = hbc(ya,yb)
res = [ya(1); ya(2)-1; yb(3); yb(4)];
  댓글 수: 3
T S Singh
T S Singh 2016년 10월 25일
편집: T S Singh 2016년 10월 25일
Thanks for your quick response. The coefficient matrix is not constant (its function of independent variable 'x'). So is it okay to use \ operator? Can u please suggest me some ways to tackle the problem of having a " singular Jacobian" error when I am reducing the value of r2<50e-9, in the above program??
Walter Roberson
Walter Roberson 2016년 10월 25일
To use \ the coefficient matrices have to be constants at the time the \ is called.
I do not know enough about how bv4pc works to make suggestions about why the Jacobian is becoming singular.

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by