t를 어떻게 선언해야하는지 모르겠습니다ㅠㅠ

function [dy]=SILAR(t,y)
t=dt;
a=0.000000000184;
b=0.8;
c=0.7;
d=0.002;
L=1235/47041434;
M=1235/47041434;
dydt=zeors(4,1);
dydt(1)={(L-M)*y(1)-a*y(1)*y(3)};
dydt(2)={a*y(1)*y(3)-b*y(2)-M*y(2)};
dydt(3)={b*y(2)-c*y(3)-d*y(3)-M*y(3)};
dydt(4)={c*y(3)-M*y(4)};
end
clear all;
clc;
[t,y]=ode(@seir,[0,300],[47041334,0,100,0])
plot(t,y)
legend('S','E','I','R')
SIER을 모델링 하기위해 다음과 같은 코드를 짰는데 계속 t가 선언되지 않았다며 실행이 되지 않습니다ㅠㅠ 도와주십시오

 Risposta accettata

madhan ravi
madhan ravi il 27 Giu 2020
Modificato: madhan ravi il 27 Giu 2020

2 voti

[t,y]=ode45(@seir,[0,300],[47041334,0,100,0])
plot(t,y) % :(
legend('S','E','I','R')
function dydt = seir(t,y)
a=0.000000000184;
b=0.8;
c=0.7;
d=0.002;
L=1235/47041434;
M=1235/47041434;
dydt=zeros(4,1);
dydt(1)=(L-M)*y(1)-a*y(1)*y(3);
dydt(2)= a*y(1)*y(3)-b*y(2)-M*y(2);
dydt(3)=b*y(2)-c*y(3)-d*y(3)-M*y(3);
dydt(4)=c*y(3)-M*y(4);
end

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!