Unable to solve the collocation equations -- a singular Jacobian encountered

1 次查看(过去 30 天)
b1 = 0.1; b2 = 0.01; A = 0.1; L = 1; b = 0.3; M = 1; R = 2; E = 1; Pr = 2; N = 2; rho = 1; a1 = 1; Ec = 10; G = 1;
BC = @(ya,yb)[ya(1)-R; ya([2;7])-1; yb([1;2;7;9]); yb(5)+ yb(1); yb(6)-E;];
ODE = @(x,y) [y(2); y(3); exp(b1*y(7))*(-L*b*y(4)*(y(4)-y(2))+M*y(2)+y(2)^2-y(1)*y(3)+A*(y(2)+(x/2)*y(3)))+b1*y(8)*y(3);
(b*(y(2)-y(4))-y(4)^2-A*y(4))/(y(5)+A.*(x/2)); (b*(y(2)+y(5))-A*y(5))/(y(5)+A.*(x/2));
-(y(6)*(y(4)+(b*(y(2)+y(5))-A*y(5))/(y(5)+A.*(x/2))))/y(5); y(8);
(2*y(2)*y(7)-y(1)*b2*y(8)+(A/2)*(4*y(7)+x*y(8))-(N/rho)*(a1*(y(9)-y(7))+b*Ec*(y(4)-y(1))^2))/(1+b2*y(7));
(a1*G*(y(7)-y(9))-2*(A+y(4))*y(9)-(A.*x/2)*y(8))/y(5);];
xa = 0; xb = 6; x = linspace(xa,xb,100);solinit = bvpinit(x,[R 1 1 0 1 0 1 1 E]);
sol = bvp5c(ODE,BC,solinit); S = deval(sol,x);
figure(2),plot(x,S(2,:),'Linewidth',1.5);xlabel('\bf\eta');ylabel('\bff^\prime(\eta)');hold on
%% when I run this code ERROR comes
  2 个评论
John D'Errico
John D'Errico 2020-10-23
编辑:John D'Errico 2020-10-23
Don't add answers asking people to look at your question. If someone wants to answer your question, they will.
And if you want to make a comment, use a comment.
MINATI PATRA
MINATI PATRA 2020-10-23
Sorry
John D'Errico, it was mistakenly happen not intensionaly.
Thank you for guiding.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by