Turn on thread page Beta
    • Thread Starter
    Offline

    2
    ReputationRep:
    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.
    https://people.sc.fsu.edu/~jburkardt...step_display.m

    The parameters are:
    sir = sir_simulation ( m, n, a, k, tau, t_max )
    where
    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.)
 
 
 
Poll
Is the Big Bang theory correct?

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.