MATLAB: The mathematics behind modelling

MATLABode45

This is my first time using MATLAB and despite reading up on tutorials I am still confused in regards to how to utilise MATLAB. I am trying to simulate a SEIR model, which consists of a system of differential equations, for the spread of dengue fever in MATLAB with the following equations and parameters:
Thank you!!!

Best Answer

You have a system of 7 coupled ODEs. You will need to code the equations into a function, define the initial conditions and interval for integration, then use an ODE solver such as ODE45 to solve the equations numerically. I got you started on your function, but you'll need to fill in the gaps and double check it:
function dSdt = denguefeverODE(t,S)
% Define parameters
Nh =
Nm =
uh =
um =
Pmh =
Phm =
beta =
nu_h =
epsilon_m =
tau_h =
f =
% Define the equations. Each element in the output contains the answer for
% one equation, so there are 7 components. For ex. S(1) is Sh while dSdt(1)
% is dSh/dt, and S(7) is Im while dSdt(7) is dIm/dt.
dSdt = zeros(7,1);
dSdt(1) = uh*Nh - (beta*Pmh*(S(7)/Nh)+uh)*S(1);
dSdt(2) = beta*Pmh*(S(7)/Nh)*S(1) - (tau_h+uh)*S(2);
.
.
.
dSdt(7) = epsilon_m*S(6) - um*S(7);
Once you are ready to solve, the solver syntax is
tspan = [t0 tf]; % Change to initial and final times
y0 = [a b c d e f g]; % Need 7 initial conditions, 1 for each variable
[t,y] = ode45(@denguefeverODE, tspan, y0)
Then you can see all of the solution components with
plot(t,y)