transfer function for these system of differential equations
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Can anyone help me write the " transfer functions" for this system of equations please.
I have managed to solve the ODE's using the code below
function diffeqs= ode_sys(t,D)
x0= -1.6;
y0=1;
tauknot= 2857;
tautwo=10;
Irest1=3.1;
Irest2=0.45;
gama=0.01;
g = @(x1,t0,t,gama) integral(@(tau) exp(-gama*(t-tau)).*x1, t0, t);
f1= @(x1,x2,z) (x1.^3 - 3*x1.^2) .* (x1<0)+ (x2-0.6.*(z-4).^2).*(x1).*(x1>=0);
f2= @(x1,x2,z)((0).*(x2<-0.25))+(6.*(x2+0.25)).*(x2>=-0.25);
x1= D(1);
y1= D(2);
z = D(3);
x2= D(4);
y2= D(5);
Ddv_Div = [y1-f1(x1,x2,z)-z+Irest1;
(y0-(5.*x1^2)-(y1));
((1/tauknot).*((4*x1-4*x0)-z));
(-y2+x2-(x2.^3)+Irest2+0.002*(g(x1,t0,t,gama))- (0.3)*(z-3.5));
((1/tautwo).*(-y2+f2(x1,x2,z)));]
end
% the code is run through the lines below
range =[1:1:1];
%Initial condition
IC =[0,-5,3,0,0];
[tsol, Dsol ] = ode45(@ode_sys,range,IC);
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Ordinary Differential Equations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!