Can anyone give my a hint as to how to get this code to work. It's suppose to compute the configuration for each time step, display an image of the configuration for each time, and return the SIR percentages. https://people.sc.fsu.edu/~jburkardt...r_simulation.m
This code is supposed to display an image of the hospital beds at each this step, indicating locations of susceptible, infected and recovered individuals. but I can get the image to give me anything useful.
The parameters are:
sir = sir_simulation ( m, n, a, k, tau, t_max )
m is the number of rows of patients.
n is the number of columns of patients.
a is the M by N matrix of the initial patient states.
k is the number of days a patient stays infected.
tau is the probability that a susceptible patient will become infected because of one "nearby" infected patient (north, south, east or west) over one day.
t_max is the total number of days to consider, counting the initial condition as day 1.
and the initial patient states can be (-1 in the patient is recovered, 0 if the patient is susceptible and a number less than k if infected for that number of days.)
What should I do?