MATLAB Answers

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

조회 수: 1(최근 30일)
MINATI PATRA
MINATI PATRA 2020년 10월 15일
댓글: MINATI PATRA 2020년 10월 23일
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
MINATI PATRA
MINATI PATRA 2020년 10월 23일
Sorry
John D'Errico, it was mistakenly happen not intensionaly.
Thank you for guiding.

댓글을 달려면 로그인하십시오.

답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by