Matlab无法解决搭配方程。遇到一个奇异的雅可比

时间:2017-07-10 00:44:17

标签: matlab

function bvp()
solinit = bvpinit(linspace(0,1,10),[0, 0.3, 0, 0.5]);
sol = bvp4c(@myprojec,@mybounds, solinit);
plot(sol.x,sol.y(1,:),'.');
%Hold on can be used to suspend the graph so as         to plot another graph on
%the same axis with different parameters
xlabel('\c');
ylabel('\theta');
function dydx = myprojec(x,y)
% enter the parameter
% x represents c
% y(i) represents f,theta
% f = y(1), f' = y(2), theta = y(4), theta' = y(5)
% star (*) replaced by 0
% infinity =5
% Max infinity = 10
% B = input('input the value of Beta:');
B = 5;
% M = input('input the value of M:');
M = 1;
% Km = input('input the value of Km:');
Km = 1.5;
% Br = input ('input the value of Br:');
Br = 12;
dydx=[ y(2);(B^2-M)*y(1)-Km;y(4);Br*((M-    B^2)*y(1)-y(2)^2)];
% Now d bcs
function res = mybounds(ya,yb)
% where to denote initial values of y at zero(0)
% finf denotes initial vlue of y at infinity (5 or 10)
% n = input('input the value of n:');
res = [ya(1)
      yb(1)-1
      ya(4)
      yb(4)-(1)];

我得到的错误是Matlab无法解决搭配方程。一个奇异的雅可比人遇到了。我很感激你的建议。

0 个答案:

没有答案