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 个评论
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!