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.)

University open days

  • University of Exeter
    Undergraduate Open Days - Exeter Campus Undergraduate
    Wed, 24 Oct '18
  • University of Bradford
    Faculty of Health Studies Postgraduate
    Wed, 24 Oct '18
  • Northumbria University
    All faculties Undergraduate
    Wed, 24 Oct '18
Who is most responsible for your success at university

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.