필터 지우기
필터 지우기

Having a problem with the ODE solver working what should I change?

조회 수: 1 (최근 30일)
Mohannad Abboushi
Mohannad Abboushi 2016년 2월 29일
In this program I have three state variables that I am trying to graph using ODE's. The code seems fine, but for some reason the ODE solver is not working. How should I change it?
function Sonichedgehog_driver
[t,y] = ode45(@Sonichedgehog, [0 24], [3.1 21.2 .44]);
dx_1 = y(:,1);
dx_2 = y(:,2);
dx_3 = y(:,3);
plot(t, dx_1, 'g', t, dx_2, 'b', t, dx_3, 'r');
legend({'Ptc1', 'Gli1', 'Gli2'});
function dy = Sonichedgehog(t, y)
alpha1=1.78;
alpha2=.14;
alpha3=19.77;
alpha4=24.8;
alpha5=13.25;
beta1=.2;
beta2=.03;
beta3=6.88;
beta4=1.33;
beta5=24.92
%X1 = 3.1;
%X2 = 21.2;
%X3 = 0.44;
X4 = 0.17;
X5 = 1.1;
X6=0;
X1 = y(1);
X2 = y(2);
X3 = y(3);
dx_1= (alpha1(X2+1)^(.1))*((X3+1)^(.92))*((X4+1)^(.7))*((X5+1)^(-.35))- beta1*((X1+1)^(.64))*(X6+1);
dx_2= (alpha2(X2+1)^(.83))*((X3+1)^(7.4))*((X4+1)^(5.6))*((X5+1)^(-2.8))- beta2*((X2+1)^(1.86));
dx_3= alpha3-beta3*((X1+1)^(.07))*((X3+1)^(2.6));
dy = [dx_1; dx_2; dx_3];

답변 (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