Hey there! Sign in to join this conversationNew here? Join for free
x Turn on thread page Beta
    • Thread Starter

    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.)
Submit reply
Turn on thread page Beta
TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

Updated: March 4, 2018
Have you ever experienced racism/sexism at uni?

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...
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.