differential equations system to be solved on matlab code

how do i solved these set of differential equantions on matlab what is the code ? attached below is the image of the qeuations

回答(1 个)

This code should work, but you must specify your initial conditions. You might want to look into other ode solvers, as with these specs the output looks pretty stiff.
%%%%%%%% Specify your volume and initial conditions!%%%%%%%%%%%
Vspan = [0 200];
Initial_conditions = [2, 1, 0]; %In the order of Fa0, Fb0 & Fc0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[t, y] = ode45(@your_ode_solver_fcn,Vspan,Initial_conditions);
plot(t,y(:,1),t,y(:,2),t,y(:,3))
function out = your_ode_solver_fcn(t,in)
%Specify the input:
Fa = in(1);
Fb = in(2);
Fc = in(3);
%Define your relationships
Kc = 0.01;
Ft = Fa+ Fb+ Fc;
Co = 1;
K = 10;
Kb = 40;
ra = - (K*Co/Ft)* (Fa-Co^2*Fb*Fc^2/ (Kc*Ft^2));
Ka = 1;
Ra = Ka*Co*Fa/Ft;
Rb = Kb*Co*Fb/Ft;
%Specify the output
dFa = ra-Ra;
dFb = -ra-Rb;
dFc = -2*ra;
out = [dFa; dFb; dFc];
end

类别

帮助中心File Exchange 中查找有关 Numerical Integration and Differential Equations 的更多信息

提问:

2021-11-29

回答:

2021-11-29

Community Treasure Hunt

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

Start Hunting!

Translated by