Solving a differential equation
Show older comments
I am looking for a reproducible code and I am trying my best to find the results but I am stuck after a stage!! Would be helpful if you can help me
I have a function given below which consist of 5 functions provided
I want to reproduce above equations in the below differential equations:
I need to graph the solution of these differential equations:
f1(G)=209/(1+e^(-G/300V3 +6.6)
f2(G)=72(1-e^(-G/144V3))
f3(G)=0.01G/V3
f4(I)=[90/(1+e^(-1.772log(I/V1) + 7.76))] +4
f5(I)=180/(1+e^(0.29I/V1 -7.5))
dG(t)/dt= Gin-f2(G(t))-f3(G(t))f4(I(t))+f5(I(t-T2))
d(I)/dt=f1(G(t))-I(t)/t1
d(I1(t))/dt= Qf1(G(t))-I(t)/t1 +(1-Q)f1(G(t-T1)
clear all;
clc;
V1=3;Gin=216;alpha=0.5;t1=6;V3=10;tau2=50;Eg=180;tau1=5;tau=[10,50];
sol = dde23(@eq24,[10,50],[210;1;80],[0, 50]);
figure(1)
plot(sol(1).x,sol(1).dy(1,:),sol(1).x,sol(1).dy(2,:),
sol(1).x,sol(1).dy(3,:))
function dy=eq24(~,y,Z)
V1=3; V3=10;
t1=6;
G=y(1);
I=y(2);
I1=y(3);
Glag1=Z(:,1); %Tau1%
Ilag2=Z(:,2); %Tau2%
f1=@(G) 209/(1+exp(-G/300*V3 +6.6));
f2=@(G) 72*(1-exp(-G/144*V3));
f3=@(G) 0.01*G/V3;
f4=@(I) 90/(1+exp(-1.772*log(I/V1) + 7.76)) +4;
f5= 180/(1+exp(0.29*I/V1 -7.5));
dy = zeros(3,1);
dy(1) = 216 - f2(G)-f3(G)*f4(I)+f5(Ilag2);
dy(2)=f1-(I/t1);
dy(3) = alpha*f1(G)-I1/t1 +(1-alpha)*f1(Glag1);
end
Accepted Answer
More Answers (1)
Rashmitha
on 20 Nov 2024
0 votes
Solve dy/dx+3x^2y = 6x^2
Categories
Find more on Numerical Integration and Differential Equations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!